Changes between Version 5 and Version 6 of WARPLab/Reference/Utility


Ignore:
Timestamp:
Mar 29, 2013, 3:55:12 PM (11 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPLab/Reference/Utility

    v5 v6  
    5757== wl_initNodes ==
    5858File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/util/wl_initNodes.m wl_initNodes.m]
     59
     60This function is the best way to create [wiki:WARPLab7/Reference/Architecture/Classes#Node wl_node] objects and have them configured to communicate with WARP nodes in your network. There are two ways of calling wl_initNodes:
     61
     621. Single Argument
     63
     64Let {{{N}}} represent the number of nodes in the network. Then,
     65
     66{{{
     67nodes = wl_initNodes(N)
     68}}}
     69will create a vector of {{{N}}} wl_node objects in the variable {{{nodes}}}
     70
     712. Double Argument
     72
     73An optional second argument can be provided to assign specific node IDs to the created wl_node objects.
     74
     75{{{
     76nodes = wl_initNodes(N, 0:(N-1))
     77}}}
     78results in precisely the same vector of wl_node objects as the single argument case. However, the optional second argument can be changed to an other vector of IDs to speak to boards configured with those IDs on their DIP switches.