Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Creating errors in MATLAB

Options
  • 17-12-2010 10:55am
    #1
    Registered Users Posts: 61 ✭✭


    Hey guys can you help me with this. I have my code doing the following;

    try


    % MY CODE


    catch

    msgbox('An error has occured please ensure that you have entered all the nessecary values for your simulink model to simulate and retry!', 'Warning','warn')
    set(handles.pushbutton1,'Enable','On')
    set(handles.pushbutton11,'Enable','On')

    end



    So any time there is an error it produces the message, but the problem is it doesnt state what the error was? Does anyone know how to get MATLAB to still produce the error in the command window when using catch?

    Thanks


Advertisement