% 
% Script to give an example of the try command
%

try 
    % code that may fail
    disp('test out a non-existent function.');
    a = ewkjlfglkqjwfjklqw(4);
    %a = sin(4);
    disp('back from the function that doesn''t exist.');
catch
    % what to do if the code failed
    disp('You do not have that function, so here is 4 + 1 instead');
    a = 4 + 1;
    % a = ewkjlfglkqjwfjklqw(4);
    error('quitting since there is a problem');
    
end