function TurnOffWarnings
try
warning('off', 'Images:initSize:adjustingMag');
warning('off', 'MATLAB:MKDIR:DirectoryExists');
warning('off', 'MATLAB:xlswrite:AddSheet');
warning('off', 'images:removing:function');
warning('off', 'MATLAB:audiovideo:wavread:functionToBeRemoved');
warning('off', 'MATLAB:table:ModifiedVarnames');
warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame')
catch ME
errorMessage = sprintf('Error in function %s() at line %d.\n\nError Message:\n%s', ...
ME.stack(1).name, ME.stack(1).line, ME.message);
fprintf(1, '%s\n', errorMessage);
uiwait(warndlg(errorMessage));
end
return;
3 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/501355-how-can-i-suppress-warnings-about-javacomponent-being-deprecated#comment_788548
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/501355-how-can-i-suppress-warnings-about-javacomponent-being-deprecated#comment_788548
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/501355-how-can-i-suppress-warnings-about-javacomponent-being-deprecated#comment_788552
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/501355-how-can-i-suppress-warnings-about-javacomponent-being-deprecated#comment_788552
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/501355-how-can-i-suppress-warnings-about-javacomponent-being-deprecated#comment_788814
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/501355-how-can-i-suppress-warnings-about-javacomponent-being-deprecated#comment_788814
Sign in to comment.