


Replaces values of zero with NaN.
Author(s)
Pierre Cazenave (Plymouth Marine Laboratory)
Revision history
2017-03-27 Removed the loops and used logical indexing instead.

0001 function array = zero_to_nan(array) 0002 % 0003 % Replaces values of zero with NaN. 0004 % 0005 % Author(s) 0006 % Pierre Cazenave (Plymouth Marine Laboratory) 0007 % 0008 % Revision history 0009 % 2017-03-27 Removed the loops and used logical indexing instead. 0010 0011 array(array == 0) = nan;