フィルターのクリア

Plotting from mat file

1 回表示 (過去 30 日間)
Emil Eterovic
Emil Eterovic 2017 年 1 月 20 日
コメント済み: Emil Eterovic 2017 年 1 月 21 日
My problem is plotting from filename.mat which has four columns:years,months,days and value for that date. Howdo i separate certain data from such a file,if i want for example plot only the values for 1st and 2nd mont of every year? mat file is included

採用された回答

Karsten Reuß
Karsten Reuß 2017 年 1 月 20 日
If you want only first and second month in your variables you can do this:
POSTAJE_CLM_hvar(POSTAJE_CLM_hvar(:,2)<3,:)
Alternatively:
POSTAJE_CLM_hvar(POSTAJE_CLM_hvar(:,2)==1 | POSTAJE_CLM_hvar(:,2)==2,:)
If you want to plot the corresponding values only for first and second month of year for example in the 5th column:
plot(POSTAJE_CLM_hvar(POSTAJE_CLM_hvar(:,2)==1 | POSTAJE_CLM_hvar(:,2)==2,5))
  2 件のコメント
Emil Eterovic
Emil Eterovic 2017 年 1 月 20 日
Thank you for a quick answer. This helps alot. Cheers
Emil Eterovic
Emil Eterovic 2017 年 1 月 21 日
Hello, i now have a different situation that i cannot figure out with the same mat file. I have to take the value of the 12th month of a year(example 1999),value of the first and second month of 2000 and calculate the mean values of those so that those three will make one point on my graph. And repeat that for every year. FYI 12th month of 1999 and 1st and 2nd month of 2000 will be presented on the graph as for year 2000, because i have to calculate for the winter of that year,which includes december of the year before. Any pointers on this?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by