How do I generate numbers like these?
In Matlab I can generate a 2d uniform distribution with the following:
size = 300;
for (i=1:size)
x(i)=i/size;
y(i)=(size-i)/size;
plot(x,y,'.');
end
How do I extend this to work for greater dimensions? For example if I
needed a uniform distribution with 5 dimensions starting with
1.0 0.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0 0.0
0.0 0.0 1.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0
0.0 0.0 0.0 0.0 1.0
Thank you
edit: here's an example of what I need for 5 dimensions
http://pastebin.com/337fKrk9
No comments:
Post a Comment