MATLAB: How to turn off a warning permanently in MATLAB 7.6 (R2008a)

MATLABoffpermanantlyturnwarningwarnings

I am getting a divide by zero warning and I want to turn it off permanently so that when I restart MATLAB the warning does not show up again.

Best Answer

Warnings can be turned off using the WARNING function available in MATLAB. For example the WARNING function can be used as shown below:
warning off <Warning ID>
Add these types of lines into the STARTUP.m file for the warning messages that you wish to turn off. If a 'startup.m' file does not exist, create one on the MATLAB path. You cannot permanently remove warnings from MATLAB.