How to generate multiple random Matrices.
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
stephen Box
le 13 Sep 2018
Commenté : Walter Roberson
le 17 Juil 2021
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 commentaires
Réponse acceptée
Walter Roberson
le 13 Sep 2018
for i = 1:3
x{i} = rand(3,3);
end
3 commentaires
chan
le 17 Juil 2021
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
le 17 Juil 2021
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!