필터 지우기
필터 지우기

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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by