- #1
ggeo1
- 63
- 0
Hello,
i have the following problem in mathematica and i want to convert it in MATLAB ,but in 3 dimensions.
the result is for example {-0.921607, -0.389386}
Now, in MATLAB (for 3d)
The problem is that the result is for example
9.9238 , a one dimension ,but i want 3d.
I can't figure how i must write it.
i have the following problem in mathematica and i want to convert it in MATLAB ,but in 3 dimensions.
Code:
npoints = 10000;
vectorpoint := {RandomReal[{-1, 1}], RandomReal[{-1, 1}]}
experiment = Table[vectorpoint, {npoints}];
experiment[[10]]
the result is for example {-0.921607, -0.389386}
Now, in MATLAB (for 3d)
Code:
npoints = 10000;
v1=2*rand-1;
v2=2*rand-1;
v3=2*rand-1;
vectorpoint=[v1,v2,v3];
experiment=(vectorpoint:npoints);
experiment(10)
The problem is that the result is for example
9.9238 , a one dimension ,but i want 3d.
I can't figure how i must write it.