1 function [o] = nanmean(i,DIM)
2 % NANMEAN same as SUM but ignores NaN's.
3 % NANMEAN is OBSOLETE; use MEAN instead. NANMEAN is included
4 % to provide backward compatibility
6 % Y = nanmean(x [,DIM])
11 % default or []: first DIMENSION with more than 1 element
15 % see also: MEAN, SUMSKIPNAN, NANSUM
17 % $Id: nanmean.m 8223 2011-04-20 09:16:06Z schloegl $
18 % Copyright (C) 2009 by Alois Schloegl <alois.schloegl@gmail.com>
19 % This is part of the NaN-toolbox. For more details see
20 % http://pub.ist.ac.at/~schloegl/matlab/NaN/
22 % This program is free software; you can redistribute it and/or modify
23 % it under the terms of the GNU General Public License as published by
24 % the Free Software Foundation; either version 3 of the License, or
25 % (at your option) any later version.
27 % This program is distributed in the hope that it will be useful,
28 % but WITHOUT ANY WARRANTY; without even the implied warranty of
29 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 % GNU General Public License for more details.
32 % You should have received a copy of the GNU General Public License
33 % along with this program; If not, see <http://www.gnu.org/licenses/>.
37 [o,n] = sumskipnan(i,DIM);
39 [o,n] = sumskipnan(i);