Hello,
I am trying to set up a vector of randomly distributed values taken from another vector using Octave (I can use Matlab as well). For example:
Now I would like to build a vector of length n with values of z randomly distributed. For example, assuming x will be a vector of length n :
What is the function I have to use (if exists) to obtain this kind of result ?
Thank you in advance.
I am trying to set up a vector of randomly distributed values taken from another vector using Octave (I can use Matlab as well). For example:
Code:
% indexes from 0 to 99
n = 0:4;
z = roots([1 0 0 0 1])
z =
-0.70711 + 0.70711i
-0.70711 - 0.70711i
0.70711 + 0.70711i
0.70711 - 0.70711i
Code:
x = [-0.70711 + 0.70711i 0.70711 - 0.70711i -0.70711 - 0.70711i -0.70711 + 0.70711i 0.70711 + 0.70711i ]
Thank you in advance.
Last edited: