| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hello, I am trying to simulate the solution of a dynamic state variable model in Netlogo. The solution is a multidimensional array of a rather large size, like 1000 by 40 by 1000, for example (can be much larger something like 1000 by 500 by 1000 by 40). I found this example, set patch-data sentence patch-data (list (list file-read file-read file-read)) in the example set, which create an arbitrary N by 3 array, I suppose. If I want to apply this example to 1000-40-1000 case, do I do (list "(list "file-read x1000 times")"x40 times) .... maybe this does not make sense... I am not exactly sure how to describe what I am thinking of. But actually putting such code seems very ugly even if it worked. Is there any easy way to do this? I can format the input file in anyway it should be. In fact, if I could just create the input file as a form of list (i.e., file contain the structured list), it is easier. Thank you so much. Phidippus |
|
#2
| |||
| |||
| "Phidippus" <mopthisandthat@hotmail.com> writes: > In fact, if I could just create the input file as a form >of list (i.e., file contain the structured list), it is easier. Yes, this is exactly what you should do: write your file so that it is structured with brackets, like this: [[[1 2 3] [4 5 6]] [[7 8 9] [10 11 12]]] (The spacing and line separation is just to help you read it; only the brackets matter to Logo.) Then a single file-read will read the entire list. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.