필터 지우기
필터 지우기

plot many variables from table

조회 수: 2 (최근 30일)
Joel
Joel 2023년 4월 4일
댓글: Joel 2023년 4월 4일
I have a 8760x2 table containing every hour of the year and a variable for each hour:
ta=[array2table(t) array2table(TIMVARDEN)];
It looks like this:
'15-Jan-2021 03:00:00' 0
'15-Jan-2021 04:00:00' 0
'15-Jan-2021 05:00:00' 0
'15-Jan-2021 06:00:00' 0
'15-Jan-2021 07:00:00' 0
'15-Jan-2021 08:00:00' 0
'15-Jan-2021 09:00:00' 0
'15-Jan-2021 10:00:00' 5.88000000000102
'15-Jan-2021 11:00:00' 171.240000000002
'15-Jan-2021 12:00:00' 0
'15-Jan-2021 13:00:00' 0
I want to make a plot or multiple plots that makes it clear when an hour has another value than zero.
Any ideas?

채택된 답변

Tesfaye Girma
Tesfaye Girma 2023년 4월 4일
you can use this format to get the list in a month and you can sort i a table
def day_in_month(year,month):
if month>12 or month<1 :
return"invalid input"
months_days=[31,28,31,30,31,30,31,31,30,31,30,31]
if is_leap(year) and month==2 :
return 29
return months_days[month-1]
  댓글 수: 1
Joel
Joel 2023년 4월 4일
Could you please specify?
at the row:
return "invalid input"
I get :
Invalid use of operator.
The variable names is shown below

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by