Home > utilities > zero_to_nan.m

zero_to_nan

PURPOSE ^

SYNOPSIS ^

function [array] = zero_to_nan(array)

DESCRIPTION ^

 Replaces data outside error bands with an interpolated value

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [array] = zero_to_nan(array)
0002 %
0003 % Replaces data outside error bands with an interpolated value
0004 %
0005 [rr,cc]=size(array);
0006 for ii=1:cc
0007 ix = find((array(:,ii))==0.);
0008 if ~isempty(ix)
0009     for i = 1:length(ix); 
0010      array(ix(i),ii) = NaN;
0011     end
0012 end
0013 end

Generated on Tue 18-Dec-2012 12:37:31 by m2html © 2005