Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Determine Equality and Find Command
조회 수: 2 (최근 30일)
이전 댓글 표시
Forgive me if my understanding is lacking, I'm new to this. I've come across a way to get the row and column for the minimum value of a matrix, but I'm not quite sure what exactly it's saying.
[row,column]=find(sse==min(sse(:)));
This seems to work, but I don't quite get it. Doesn't == set the two sides equal to one another? My interpretation of this is that it is setting the matrix sse equal to its minimum, but that's obviously not what it's doing? Would I just be better off with the ind2sub command? I don't fully understand exactly what that does.
thanks
댓글 수: 0
답변 (1개)
Sean de Wolski
2015년 1월 23일
One = sign sets, two compares. Break it down into pieces:
[1 2 3 3 pi] == 3
The result is a logical vector. Find then finds all of the "true" ones in this and gives row/col coordinates.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!