How to average Bimonthly into monthly and yearly?

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

Answers (1)

Bjorn Gustavsson
Bjorn Gustavsson on 21 Jun 2019
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 Comments
Reyadh Albarakat
Reyadh Albarakat on 25 Jun 2019
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 on 25 Jun 2019
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!

Sign in to comment.

Categories

Find more on Just for fun 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!