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!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by