nanmean and nanstd are used