error-Unbalanced or unexpected parenthesis or bracket.
古いコメントを表示
I have extracted shape feature using canny process http://www.mathworks.in/matlabcentral/answers/23169-slope-magnitude-technique-with-sobel-operator
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
2011 年 12 月 9 日
The error message "Unbalanced or unexpected parenthesis or bracket" is very clear, isn't it?
回答 (1 件)
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
2011 年 12 月 9 日
Daniel Shub
2011 年 12 月 9 日
Of course you are. It has 2 opening parentheses and 3 closing ones. You need to add another opening parentheses (or remove a closing one. The DWIM toolbox will be able to handle this for you, but Walter is taking an end-of-year break. This means you will need to figure out for yourself where to add or delete a parenthesis. I would guess you mean:
imwrite((gsq, []),strtemp)
Note the equal number of opening and closing parentheses.
Pat
2011 年 12 月 10 日
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.
カテゴリ
ヘルプ センター および File Exchange で Image Arithmetic についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!