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

3 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by