How to separate monthly data from yearly?

1 view (last 30 days)
eko supriyadi
eko supriyadi on 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

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!