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 Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by