Random angle in matlab -


i'm trying write matlab program able random walk, each step/vector has same length , thing determines direction "random" angle. angle not quite random since has specific boundary conditions. i'm new matlab, if have tips or links webpages feel free post them here.

use function rand(1) generate observation of uniform random variable drawn range [0,1]. can convert variable range of angles. code below might trick.

randval = rand(1); % generate observation of random variable randangle = randval*(maxangle-minangle) + minangle; % map observation angle 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -