writting error meesage
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Oleg Komarov
2011-5-30
if r > 0.49
sprintf('The person is accepted.')
else error('The person is unccepted or not exist.')
end
0 个评论
更多回答(1 个)
Philip
2011-5-30
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!