フィルターのクリア

How to plot selected columns from UITable in app designer (2019b)?

6 ビュー (過去 30 日間)
Ihab Abboud
Ihab Abboud 2020 年 5 月 19 日
コメント済み: Ameer Hamza 2020 年 5 月 19 日
I have created an app using designer app that displays data in a UITable. I want the user to select two columns then plot them. I have figured out how to keep track of the selected indices and get the selected columns out of that.
I tried this
T = app.UITable.Data;
plot(T(:,app.ColumnsSelected(1)),T(:,app.ColumnsSelected(2)));
The problem here is that T(:,app.ColumnsSelected(1or2)) is a table so plot gives an error because it doesn’t plot tables
I have been trying this for a while now without success.
Thanks

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 19 日
編集済み: Ameer Hamza 2020 年 5 月 19 日
Use brace indexing
plot(app.UIAxesName, T{:,app.ColumnsSelected(1)},T{:,app.ColumnsSelected(2)});
Also, note that first input to plot shoule be the handle to UIAxes.
  2 件のコメント
Ihab Abboud
Ihab Abboud 2020 年 5 月 19 日
oh wow, thanks.
Ameer Hamza
Ameer Hamza 2020 年 5 月 19 日
I am glad to be of help!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by