WHY DO I GET THIS ERROR USING THE ERROR BAR AND PLOT?

조회 수: 2 (최근 30일)
Pul
Pul 2021년 7월 21일
댓글: Star Strider 2021년 7월 21일
Hello,
does anyone know why I get this error: "Input arguments must be numeric, datetime, duration or categorical"?
Thank you.
  댓글 수: 1
Dhruv G
Dhruv G 2021년 7월 21일
Jan1989 seems to have strings and Var2,Var4 and Var5 seem to be NaNs

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

채택된 답변

Star Strider
Star Strider 2021년 7월 21일
The errorbar call should be:
errorbar(x, MODESTAMMEQ.Var5, MODESTAMMEQ.Var4,'.r','MarkerSize',6)
since ‘MODESTAMMEQ.Jan1989’ (that likely threw the error) has to be processed in the regexp and datetime calls to be usable as ‘x’.
However the ‘MODESTA’ table does not exist, so the second plot call does nothing, and substituting:
plot(x,[y, MODESTAMMEQ.Var5]);
gives a very strange result (at least to me).
.
  댓글 수: 8
Pul
Pul 2021년 7월 21일
Ah, okay, I got it!
It's correct they are in that way.
Thank you very much for your help!
Star Strider
Star Strider 2021년 7월 21일
As always, my pleasure!
.

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

추가 답변 (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