Help with random numbers in Matlab
Does anyone know how to generate a matrix or sequence of random numbers in Matlab? The numbers have to fall inside a ellipse of equation:
t=[0:2*pi/100:2*pi];
x=5*cos(t);
y=1*sin(t);
plot(x,y,'.')
or any other ellipse/shape.
The end result would be an ellipse filled with random points.
I've tried looking for a command that would generate points within a constraint but to no avail.
|