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

 채택된 답변

Oleg Komarov
Oleg Komarov 2011년 5월 30일

1 개 추천

if r > 0.49
sprintf('The person is accepted.')
else error('The person is unccepted or not exist.')
end

추가 답변 (1개)

Philip
Philip 2011년 5월 30일

1 개 추천

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.

카테고리

도움말 센터File Exchange에서 Communications Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by