function B = nan2zero(A)
%NAN2ZERO      B = nan2zero(A)    
%
%Converts all the NaNs in 'A' to zeros.

if nargin == 0
 help nan2zero
 break
end

B=A;
B(isnan(B))=0;