In the following simple code, the message box is not working:
prompt={'Enter the first number:','Enter the second number:'};dlg_title='Data Input';num_lines=1;n=inputdlg(prompt,dlg_title,num_lines)N1=str2num(n{1});N2=str2num(n{2})c=N1+N2message=num2str(c)title='The sum'msgbox(message,title,'error')
I have got the following error message
Index exceeds matrix dimensions.Error in InOutBox (line 9)msgbox(message,title,'error')
Best Answer