How to average Bimonthly into monthly and yearly?

1 回表示 (過去 30 日間)
Reyadh Albarakat
Reyadh Albarakat 2019 年 6 月 20 日
コメント済み: Bjorn Gustavsson 2019 年 6 月 25 日
Hi Everyone,
Please, I have Bimonthly images for 37 years. (1982-2018). I need your help to create a code to average Bimonthly data into monthly and yearly. Please, look at the following data:
'1982_01_15a.n07-VI3g.tif'
'1982_01_15b.n07-VI3g.tif'
'1982_02_15a.n07-VI3g.tif'
'1982_02_15b.n07-VI3g.tif'
'1982_03_15a.n07-VI3g.tif'
'1982_03_15b.n07-VI3g.tif'
'1982_04_15a.n07-VI3g.tif'
'1982_04_15b.n07-VI3g.tif'
'1982_05_15a.n07-VI3g.tif'
'1982_05_15b.n07-VI3g.tif'
'1982_06_15a.n07-VI3g.tif'
'1982_06_15b.n07-VI3g.tif'
'1982_07_15a.n07-VI3g.tif'
'1982_07_15b.n07-VI3g.tif'
'1982_08_15a.n07-VI3g.tif'
'1982_08_15b.n07-VI3g.tif'
'1982_09_15a.n07-VI3g.tif'
'1982_09_15b.n07-VI3g.tif'
'1982_10_15a.n07-VI3g.tif'
'1982_10_15b.n07-VI3g.tif'
'1982_11_15a.n07-VI3g.tif'
'1982_11_15b.n07-VI3g.tif'
'1982_12_15a.n07-VI3g.tif'
'1982_12_15b.n07-VI3g.tif'
.
.
.
.
'2018_12_15a.n07-VI3g.tif'
'2018_12_15b.n07-VI3g.tif'
Thank you in advance
Reyadh

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 6 月 21 日
Tips: have a look at the dir, for function and keyword repsectively. Presumably you have some function for reading your .tif-files, but those two constructs should get you going.
HTH
  4 件のコメント
Reyadh Albarakat
Reyadh Albarakat 2019 年 6 月 25 日
Thank you Bjorn for your reply. Please, do a favor to create a yealy average. Please complete your help. I am a beginner user in Matlab
Thank you
Reyadh
Bjorn Gustavsson
Bjorn Gustavsson 2019 年 6 月 25 日
I could, but in the long run it is better if you do it yourself. Take the task step-by-step. You know that you can have nested loops, and that you can use index-variables that you can increment anywhere you want, you know how many months there is in a year. You can do this!

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

Community Treasure Hunt

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

Start Hunting!

Translated by