Info
此问题已关闭。 请重新打开它进行编辑或回答。
can someone help me fix this for loop ?
2 次查看(过去 30 天)
显示 更早的评论
I have three more arrays w, u and v they all have some elements from the array but w, u and v are all unique so do not have matching rows.
I want to be able to set the condition in this loop so that
[rows, columns] = size(pair); for row = 1 : rows thisRow = pair(row, :);
*if (thisRow == rowFromV) do something ..
else if (thisRow == rowFromW) do something...
else if (thisRow == rowFromU) do something
end end end*
I need for it to be able to scan this row against rows from u w and v ... please somebody help
0 个评论
回答(1 个)
Image Analyst
2015-3-17
Like I said in your duplicate question, use the all() function:
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 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!