plot three variables of table

1 回表示 (過去 30 日間)
Mukund
Mukund 2017 年 11 月 5 日
回答済み: Peter Perkins 2017 年 11 月 16 日
I have Matlab generated table T with four columns: A,B,C,D. I want to plot three columns B,C,D.Following command work only with plotting of two variables, when third variable is inserted in plot command, it gave error:"Data must be single matrix Y or list of pairs X,Y."
plot(T{:,'B'},T{:,'C'},T{:,'D'})
Is there any workaround to tackle this problem.

回答 (2 件)

Steven Lord
Steven Lord 2017 年 11 月 5 日
Do you want a 3-D plot? If so use plot3 instead of plot.
  1 件のコメント
Mukund
Mukund 2017 年 11 月 5 日
Thanks

サインインしてコメントする。


Peter Perkins
Peter Perkins 2017 年 11 月 16 日
Also, you may find it more appealing to type T.B,T.C,T.D rather than using braces. Braces are best used when you meed more than one table variable.

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by