How to make a repetitive random array with a curtain interval?
Show older comments
I need a array with 5000 increasing float and random numbers from 0 to 360 and also it should be repetitive inside like 0,.....,360,0,........,360,0.... and so on. Here my code without repetition feature:
a = 0;
b = 360;
% rng('shuffle');
r1 = sort((b-a)*rand(5000,1)+a,'ascend');
Accepted Answer
More Answers (0)
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
