Generate an array which all elements are smaller than other array elements respectively
3 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Logical 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!