Generate an array which all elements are smaller than other array elements respectively

3 Ansichten (letzte 30 Tage)
Hi all,
Currently, I want to generate 3 arrays "w1, w2, w3" where all elements of w1 smaller than corresponded elements of w2 and elements of w2 smaller than corresponded elements of w3. I do as following but because of "round" function, it makes the equal. How can I prevent this?
w3 = round(2.25.*rand(N,1)+0.25, 2);
w2 = round((w3-0.24).*rand(N,1)+0.24, 2);
w1 = round((w2-0.23).*rand(N,1)+0.23, 2);
Thank you in advance for your consideration.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by