Iterating over Columns/Rows (no index)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Standard way to iterate over matrix columns or rows is to use an incrementing iterator and index the matrix from there.
Are there alternative ways to do this?
Similar to iterating over vector values, like this:
for value = some_vector
...
end
0 Commenti
Risposte (1)
Yongjian Feng
il 21 Nov 2021
Modificato: Yongjian Feng
il 21 Nov 2021
If the array is a row vector, then it works
a = [1 2 3]
for i = a
disp(i)
end
0 Commenti
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!