필터 지우기
필터 지우기

When I try to run the following line of code, I get the error message "Error: Unbalanced or unexpected parenthesis or bracket." Although I understand the content of the error message, I cannot determine what is wrong with my syntax.

조회 수: 1 (최근 30일)
When I try to run the following line of code, I get the error message "Error: Unbalanced or unexpected parenthesis or bracket." Although I understand the content of the error message, I cannot determine what is wrong with my syntax.
[row,col]=find(mat==1(mat));
Thank you.

채택된 답변

per isakson
per isakson 2012년 11월 29일
1(mat)
is wrong. What's the intent?
  댓글 수: 2
Emma
Emma 2012년 11월 29일
I would like to find the row/column locations of all values in a 2400x2400x46 matrix that are equal to 1 (ideally in the output format of a matrix that has the rows in one column and the corresponding columns in a second column).
Image Analyst
Image Analyst 2012년 11월 29일
It's the mat'th element of one. ;-) Maybe try this:
[row, col] = find(mat == 1);
Just trying to give you something to try in advance. Tell us if that did work (and mark this as "Answered") or else tell us what you intended.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by