Convert year data to month (40 years = 480 months) in rows
古いコメントを表示
Hi everyone!
I'm doing a research using Matlab and today it is my first month using it. However, I can't figure out how to solve my problem.
I have the estimate population for 40 years. The demand of water is calculated multiplying the population by the Galons per day. Each year's demand should by divided by 12 months which is multiplied for a factor.
For example:
Gallon per Day: 20;
Year: 2010...2040
Population: 500
Demand: 500 * 20 (Demand each year)
-
After this I should divide each year demand to 12 months and multiply by the month factor.
Ex:
Jan: Total year demand * 0.2 Feb: Total year demand * 0.8 ... Dec: Total year demand * 0 ---
After all calculations I should have an Array with 480 rows (40 years * 12 months) with every month value.
Ex:
Jan
.
.
Dez
Jan
.
The first thing that came to my mind is create a zeros(480,1) and replace it by the values.
So my question is, would someone just give me the way I should start? I don't know how to put all this answers in the same column.
3 件のコメント
Azzi Abdelmalek
2015 年 6 月 25 日
Can you be more clear? How your data are stored? in a text file? and what do you want to get. You can illustrate with a short example, not necessarily with all your data.
Purushottama Rao
2015 年 6 月 25 日
is the month factor varies over the years?
Felipe Michelin
2015 年 6 月 25 日
編集済み: Felipe Michelin
2015 年 6 月 25 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!