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

1 回表示 (過去 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 Center および File ExchangeErrorbars についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by