writting error meesage
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello how can i write code to print message my answer is:
if r > 0.49 sPrintf('the person is accepted.'); else error('the person is unccepted or not exist.') end;
please correct my answer
thanks
0 Kommentare
Akzeptierte Antwort
Oleg Komarov
am 30 Mai 2011
if r > 0.49
sprintf('The person is accepted.')
else error('The person is unccepted or not exist.')
end
0 Kommentare
Weitere Antworten (1)
Philip
am 30 Mai 2011
try using the 'msgbox()' function:
ie.
if r > 0.49
disp('The person is accepted')
else
msgbox('The person is not accepted','An error has occurred','error')
end
See "doc msgbox" for more details.
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!