Which Version support the new syntax of try statement
이전 댓글 표시
I used try function to solve the question with following format: try statements catch exception %here statements end
When this program run in Matlab R2011b, it is OK. But it doesn't work in MATLAB 7.0.
Which version of MATLAB is support the below format with "exception".
댓글 수: 2
Andreas Goser
2013년 12월 3일
To my best knowledge, your issue is not related to version compatibilty. CAn you share the code that is not working in MATLAB 7.0?
Walter Roberson
2013년 12월 3일
Qingping commented
A=rand(3,3);
B=rand(2,2);
try
C = [A; B];
catch err
if strcmp(err.identifier,'MATLAB:catenate:dimensionMismatch')
C={A;B}
end
end
C
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Software Development에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!