MATLAB: Writting error meesage

image processing

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

Best Answer

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