I want to calculate the mean of the soil moisture satellite data ,i have daily based data of one year with size 1440*720,and how to calculate the mean? I am confused to find

1 回表示 (過去 30 日間)
sm_mean = nanmean(:,:,3)

回答 (1 件)

KSSV
KSSV 2023 年 5 月 15 日
編集済み: KSSV 2023 年 5 月 15 日
sm_mean = nanmean(data,'all')
Demo
A = rand(3,3,3) ;
for i = 1:3
mean(A(:,:,i),'all')
end
ans = 0.5233
ans = 0.4704
ans = 0.4034
  1 件のコメント
Jincy
Jincy 2023 年 5 月 17 日
when i try this ie,
filename = dir('*nc') it shows the all nc datas
data = 'path of folder which contains all 30 days datas'
and i try to find the mean of 30days data of size 1440*720 ie
for i= 1:length(data)
sm.mean(i) = nanmean(:,:,i)
end
it doesnt works..shows 'nanmean is not recommended in matlab ,use mean instead of nanmean' and shows some errors.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAgriculture についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by