Description Usage Arguments Details Value Author(s) See Also Examples
NLSetPatches
is an easy way to set the values of all patches to the values of a matrix.
1 | NLSetPatches(patch.var, in.matrix, nl.obj=NULL)
|
patch.var |
The name of the patch variable to set. |
in.matrix |
A matrix that represents the NetLogo world (has the same dimensions). |
nl.obj |
(optional) A string identifying a reference to a NetLogo instance created with |
The matrix must have the same x- and y-dimensions as the NetLogo world, indices beginning with (1,1).
The upper-left cell (1,1) of the matrix represents the upper-left patch of the NetLogo world, no matter where the origin of the NetLogo world is set.
This function is not available when running NetLogo 3D. Use NLSetPatchSet
instead.
No return value.
Jan C. Thiele <rnetlogo@gmx.de>
NLReport
,
NLGetAgentSet
,
NLGetGraph
,
NLDfToList
1 2 3 4 5 6 7 | ## Not run:
nl.path <- "C:/Program Files/NetLogo 6.0/app"
NLStart(nl.path)
m1 <- matrix(1:1089 , 33)
NLSetPatches("pcolor", m1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.