Hi(adsbygoogle = window.adsbygoogle || []).push({});

I've been trying to figure this out for a bit and thought one of you might know the answer off the top of your head.

I have an if-statement in my MATLAB program that error checks a matrix and vector size. I want the program to print an error message and then end the program (like a ctrl-c) if the error condition is satisfied. Something like this:

where ?????????? is the function the would end the program. Does such a function exist, and if so, what is it?Code (Text):if a~=b

fprintf('STFU N00B');

???????????

end

% other stuff

Thanks in advance.

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB: killing a program

Loading...

Similar Threads for MATLAB killing program | Date |
---|---|

MATLAB: forces acting on an object | Apr 6, 2018 |

MATLAB Matlab histogram | Apr 4, 2018 |

MATLAB Sovling Bernoulli's differential equation in matlab? | Apr 3, 2018 |

MATLAB Matlab-like software | Mar 27, 2018 |

A Mathematical Analysis of Randy Johnson's bird killing fastball | Jun 15, 2006 |

**Physics Forums - The Fusion of Science and Community**