Randomly drawing from a hypercube in Matlab -


consider n-cube (defined here) n>3. suppose centered @ origin of cartesian plane , each edge has length 10.

i write piece of code in matlab allows me randomly draw 1 point (with n coordinates) hypercube. there way without pre-defining n-dimensional grid? in particular application n=11.

to draw 1 point volume of n-dimensional hypercube side s, points having equal probability, call

s = 10; point = (rand(1,n)-0.5)*s; 

replace 1 larger number if want draw many points @ once.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -