Info

この質問は閉じられています。 編集または回答するには再度開いてください。

n*2 matrix which come from output--Row is not fixed but column is 2--- and that process rotate in loop 10 times save all values of loop in result matrix

1 回表示 (過去 30 日間)
Pratik Anandpara
Pratik Anandpara 2017 年 4 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
a=18;
b=22;
for i=1:10
r1 = randi([18 22],1,1)
name= (b-a).*rand(r1,2) + a
end
save this all name matrix values which generate in each loop save in result matirx
  2 件のコメント
Jan
Jan 2017 年 4 月 8 日
The question is not clear. Please show us a small example.
Pratik Anandpara
Pratik Anandpara 2017 年 4 月 9 日
a=18:
b=22;
for i=1:10
r1 = randi([18 22],1,1)
name= (b-a).*rand(r1,2) + a
end
save this all name matrix values which generate in each loop save in result matirx

回答 (1 件)

Jan
Jan 2017 年 4 月 12 日
A guess:
name = cell(1, 10);
a = 18:
b = 22;
for i = 1:10
r1 = randi([18 22],1,1);
name{i} = (b-a) .* rand(r1, 2) + a;
end

この質問は閉じられています。

タグ

タグが未入力です。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by