Suppose you want to create a uniform square grid of initial conditions on the (x,y) plane. This can be done using
s = 2;
step = 0.01;
data = Flatten[Table[{i, j}, {i, -s, s, step}, {j, -s, s, step}], 1];
ICs = Length[data]
Now my question is rather simple. How can I adjust the step
so as the Length
of the list to be equal to N
, let's say N = 1000
?
Many thanks in advance!
step = 2s/(N-1)
. $\endgroup$N@Array[ic, Sqrt[100] {1, 1}, {{-s, s}, {-s, s}}] // Flatten // Length
works, then it is a duplicate. $\endgroup$