Azzera filtri
Azzera filtri

Storing for loop calculations

1 visualizzazione (ultimi 30 giorni)
Eric
Eric il 13 Mag 2014
Risposto: Image Analyst il 14 Mag 2014
I am interested in storing all the results of a for loop in separate matrices. How do I write a function such that Matlab will store the matrix result of, say, the ith iteration as [Ai]?

Risposte (1)

Image Analyst
Image Analyst il 14 Mag 2014
for k = 1 : whatever
A(k) = blahblahFooBar;
end
It's recommended to use variables other than i and j (imaginary variables) as loop indexes.

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by