How to display an error message with Try/catch?
Ältere Kommentare anzeigen
Hi
I am a complete newbie. I have created a GUI, and in this GUI at the first the user should choose a video to load, after that he should enter a number(of frame) for visualising the photo of this frame. I want to use a try/catch who doesn't let the user to enter a number which is superior than the existing number of frames and display an error message. But I don't know how to do that...( The user can choose any video at the first, so I won't know the number of frames. How should I specify the range of the numbers that he can enter? I know that it could be with the size() but I don't know how...)
1 Kommentar
Image Analyst
am 2 Jul. 2013
Bearbeitet: Image Analyst
am 2 Jul. 2013
Akzeptierte Antwort
Weitere Antworten (1)
Chandrasekhar
am 2 Jul. 2013
try
% code in try part
catch
errordlg('error')
end
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!