plot a table of two columns

105 ビュー (過去 30 日間)
William Lancelot
William Lancelot 2021 年 10 月 17 日
コメント済み: Ty Edmunds 2023 年 9 月 20 日
I have a UITable in MATLAB appdesginer that looks like this:
column 1 column 2
0 4
2 3
4 11
and so forth
I would like to create a plot that takes the first column as the x inputs and the second column as the y inputs on the UIAxes
ex: plot(x,y) or plot(column 1, column2)
Can someone please tell me how I can achieve this? - thanks
  1 件のコメント
Ty Edmunds
Ty Edmunds 2023 年 9 月 20 日
h=[0 0
2200 6
4000 10
6500 16
11200 31
17000 46
20000 54
26000 70
30000 80
33000 82
38000 85
44000 86];
plot(h(:,1),h(:,2))

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

採用された回答

KSSV
KSSV 2021 年 10 月 17 日
If T is your table. To plot use:
plot(T.(1),T.(2))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by