how can i create a loop which reads rows in an array?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I want to create a loop which read each row in an array. the array have dimensions of 90x2.
0 Commenti
Risposta accettata
Image Analyst
il 17 Mar 2015
[rows, columns] = size(array);
for row = 1 : rows
thisRow = array(row, :) % No ; so it will echo to command window.
% Now do something with thisRow.....
end
4 Commenti
Image Analyst
il 17 Mar 2015
Try
if all(thisRow == rowFromV)
To format your code, read this: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements 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!