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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!