How to use duration data in the x axis of a patch graph?

조회 수: 9 (최근 30일)
Pietro Fedrizzi
Pietro Fedrizzi 2021년 10월 23일
댓글: Star Strider 2021년 10월 25일
I have to realize a "timeline" patch graph. Even though the vectors X and Y that I use in the patch function have the same dimensions, it says that "vectors must be the same length". I think it's because in my case I use for X, duration type data.
Any suggestions on how to handle duration data in a patch graph?

채택된 답변

Star Strider
Star Strider 2021년 10월 23일
Post the code and post the MATLAB version you are using. Only in the last 2 releases (that I am aware of) has patch supported datetime or duration arrays.
If I remember correctly, fill always has, so that may be a work-around.
.
  댓글 수: 10
Pietro Fedrizzi
Pietro Fedrizzi 2021년 10월 25일
Got it!
Thanks again Sir for you time and your help!
Star Strider
Star Strider 2021년 10월 25일
As always, my pleasure!
.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by