calculates the mean of the squares
y = nan_meansq(x,DIM,W)
dimension
first DIMENSION, with more than 1 element
weights to compute weighted mean (default: [])
features: - can deal with NaN's (missing values) - weighting of data - dimension argument also in Octave - compatible to Matlab and Octave