How to separate monthly data from yearly?

1 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by