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!