make several matrices in a for loop
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Make various matrices in one for loop. Hellow, its problaly very easy but i cant find it nowhere.
I want to make a program that produces several matrices. to make ten matrices i tried:
for i=0:10
matrix[i] = rand(12,12)
end
to make 10 matrices with 12x12 random numbers but i doesnt work. Thx in advance
0 commentaires
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 1 Mai 2011
First off, you want to create 10 matrices but you execute the loop 11 times.
Secondly, indexing at 0 does not work for any predefined MATLAB array types.
0 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements 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!