Back to the main page.
Bug 737 - warning on/off should always revert to the previous warning state at the end of the function
Status | CLOSED FIXED |
Reported | 2011-06-07 14:12:00 +0200 |
Modified | 2011-07-13 14:46:39 +0200 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Cristiano Micheli |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2011-06-07 14:12:18 +0200
plotting/ft_plot_box.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_dipole.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_lay.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_line.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_matrix.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_text.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_topo.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_topo3d.m:warning('on', 'MATLAB:divideByZero'); plotting/ft_plot_vector.m:warning('on', 'MATLAB:divideByZero'); It should be like ws = warning(...) % do something % revert to previous warning state warning(ws); this is related to http://bugzilla.fcdonders.nl/show_bug.cgi?id=48