How to separate monthly data from yearly?

1 visualizzazione (ultimi 30 giorni)
eko supriyadi
eko supriyadi il 14 Feb 2018
hello, everyone. I have a matrix of 15x18x213 size.
15 is longitude
18 is latitude, and
213 is time (month), the year start 2000-2017
my problem is.. how I can grab standard deviation for every month so I get new a matrix with size 15x18x12.
I'm tried with this code to looking for mean and work
%the code, work for mean
for k = 1:12
ind = month==k;
sst(:,:,k) = nanmean(data(:,:,ind),3);
end
%the code, not working
for k = 1:12
ind = month==k;
sst(:,:,k) = nanstd(data(:,:,ind),3);
end
I need an advance for it.. tks

Risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by