error-Unbalanced or unexpected parenthesis or bracket.

조회 수: 3 (최근 30일)
Pat
Pat 2011년 12월 9일
i have 100 imaged in a folder and have processes,but wen i try to write those image into a folder i get error as
Unbalanced or unexpected parenthesis or bracket.
please help
strtemp=strcat('D:\shape\',int2str(m),'.',pickind);
imwrite((gsq, []),strtemp))
where shape is the folder i want to store ,please help
  댓글 수: 1
Jan
Jan 2011년 12월 9일
The error message "Unbalanced or unexpected parenthesis or bracket" is very clear, isn't it?

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

답변 (1개)

Daniel Shub
Daniel Shub 2011년 12월 9일
The command
imwrite((gsq, []),strtemp))
has 2 opening and 3 closing parenthesis. The MATLAB editor picks up on these things pretty well.
  댓글 수: 4
Pat
Pat 2011년 12월 10일
same error
Expression or statement is incorrect--possibly unbalanced (, {, or [.
Jan
Jan 2011년 12월 10일
Under which circumstances are you getting the same error?
Please look at the error message carefully. It explains exactly in which line the problem occurs. Then count all opening and closing round, square brakets and curly braces. They do not match.

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

Community Treasure Hunt

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

Start Hunting!

Translated by