MATLAB: How to permanently disable a specific warning that M-Lint generates

analyzercodeMATLABmlint

I would like to tell M-Lint to stop generating a specific error message for all my programs.

Best Answer

The ability to set system-wide preferences for M-Lint warnings and errors was added in MATLAB 7.3 (R2006b). These may be set in the general preferences by selecting from the MATLAB desktop 'File->Preferences...' and clicking on the 'M-Lint' node.
For previous versions, you may disable M-Lint warnings and errors on a specific line of MATLAB code. To do this, add the "%#ok" token to the end of the line with the warning to force M-Lint to skip checking the line of code.