%
%
%
% function [mnnan]=meannnan(y);
%
% outputs the mean of all the not NaN's in a series
%
function  [mnnan]=meannnanm(y);
[nr,nc]=size(y);
for i=1:nc;
  id=find(isnan(y(:,i))~=1);
  mnnan(i)=mean(y(id,i));
end;
