フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Averaging 30 arrays into one using function

1 回表示 (過去 30 日間)
jschen1
jschen1 2019 年 11 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello,
I have many different arrays of certain days, and I need to average (using mean) them into month sections. This means averaging 30 or 31 different arrays.
Here is code I have to extract the data from the netCDF file (which works):
function x = read_aice_d(filename,day)
count = [Inf,Inf,1];
stride = [1,1,1];
startLoc = [1,1,day];
x = ncread(filename,'aice_d',startLoc,count,stride);
end
However, I am trying to make a function that will extract 30 of these arrays at once (each array is 320x104 double) and then average those into one array. I am currently stuck on how to do that. Thank you in advance!
  1 件のコメント
Stephen23
Stephen23 2019 年 11 月 14 日
"However, I am trying to make a function that will extract 30 of these arrays at once..."
From what?
From 30 different files, or from one array already in MATLAB memory?

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by