1 function o=meansq(x,DIM,W)
2 % MEANSQ calculates the mean of the squares
9 % N STD of N-th dimension
10 % default or []: first DIMENSION, with more than 1 element
11 % W weights to compute weighted mean (default: [])
12 % if W=[], all weights are 1.
13 % number of elements in W must match size(x,DIM)
16 % - can deal with NaN's (missing values)
18 % - dimension argument also in Octave
19 % - compatible to Matlab and Octave
21 % see also: SUMSQ, SUMSKIPNAN, MEAN, VAR, STD, RMS
23 % This program is free software; you can redistribute it and/or modify
24 % it under the terms of the GNU General Public License as published by
25 % the Free Software Foundation; either version 2 of the License, or
26 % (at your option) any later version.
28 % This program is distributed in the hope that it will be useful,
29 % but WITHOUT ANY WARRANTY; without even the implied warranty of
30 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 % GNU General Public License for more details.
33 % You should have received a copy of the GNU General Public License
34 % along with this program; If not, see <http://www.gnu.org/licenses/>.
36 % Copyright (C) 2000-2003,2009 by Alois Schloegl <alois.schloegl@gmail.com>
37 % $Id: meansq.m 8223 2011-04-20 09:16:06Z schloegl $
38 % This function is part of the NaN-toolbox for Octave and Matlab
39 % http://pub.ist.ac.at/~schloegl/matlab/NaN/
46 [o,N,ssq] = sumskipnan(x,[],W);
48 [o,N,ssq] = sumskipnan(x,DIM,W);