필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

can someone help me fix this for loop ?

조회 수: 2 (최근 30일)
ME
ME 2015년 3월 17일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (1개)

Image Analyst
Image Analyst 2015년 3월 17일
Like I said in your duplicate question, use the all() function:
Try
if all(thisRow == rowFromV)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by