I want to create a random array with values between 0 to 255 but without any looping value, like (0: 255) but its value is scrambled. how to do it?
output like
32, 204, 16, 92, ...
I want to create a random array with values between 0 to 255 but without any looping value, like (0: 255) but its value is scrambled. how to do it?
output like
32, 204, 16, 92, ...
With really random and possibly repeating numbers:
randi(256,1,256)-1
Every value occuring exactly once, random permutation:
randperm(256)-1
I am not sure what you mean by looping but if you want a random array with values between 0 and 255 uniformly distributed you can do this:
a = floor(256*rand(1,10000));
This will give you an array with 10000 values uniformly distributed between 0 and 255