zero_to_nan.m 254 Bytes
Newer Older
1
function array = zero_to_nan(array)
2
%
3
% Replaces values of zero with NaN.
4
%
5 6 7 8 9 10 11
% Author(s)
%    Pierre Cazenave (Plymouth Marine Laboratory)
%
% Revision history
%    2017-03-27 Removed the loops and used logical indexing instead.

array(array == 0) = nan;