How to generate multiple random Matrices.
17 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to generate multiple matrices and display them in a array to use for a function. But stuck here.
for i = 1:3
x = rand(3,3);
end
0 件のコメント
採用された回答
Walter Roberson
2018 年 9 月 13 日
for i = 1:3
x{i} = rand(3,3);
end
3 件のコメント
chan
2021 年 7 月 17 日
How can you display a number say in matrix x{1} ,i want to get the number of row 2,column 3 and how can we make a comparison between matrix x{1} element and x{2} element???
Walter Roberson
2021 年 7 月 17 日
for i = 1:3
x{i} = randi(4,3,3);
end
celldisp(x)
A = x{1}(2,3)
B = x{2}(2,3)
A == B
.. they happened to be the same for this randomly generated data.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!