how can i create a loop which reads rows in an array?
1 次查看(过去 30 天)
显示 更早的评论
I want to create a loop which read each row in an array. the array have dimensions of 90x2.
0 个评论
采纳的回答
Image Analyst
2015-3-17
[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 个评论
Image Analyst
2015-3-17
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!