- #1

- 63

- 0

## Main Question or Discussion Point

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]]
```

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)
```

9.9238 , a one dimension ,but i want 3d.

I can't figure how i must write it.