How to (scatter) plot a cell array from a table

4 ビュー (過去 30 日間)
Johannes
Johannes 2018 年 11 月 24 日
回答済み: madhan ravi 2018 年 11 月 24 日
Hello,
I have got a table A with cells saved in the rows/columns (screenshot). Now I want to scatter two vars:
% option 1:
scatter(A.Time_s(1), A.P_1_1(1));
% option 2:
scatter(A.Time_s(1){1,:}, A.P_1_1(1){1,:});
% option 3:
scatter(A{1,'Time_s'}{1,:}, A{1,'P_1_1'}{1,:});
Now, only option 3 works for me, which is a bit complicated. Is there a way to do it more like option 1?
The error for 1 is 'Input arguments must be numeric, datetime, duration or categorical.'
Thanks for your help,
Johannes
Bildschirmfoto 2018-11-24 um 12.42.27.png
  1 件のコメント
madhan ravi
madhan ravi 2018 年 11 月 24 日
can you upload the mat file?

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

採用された回答

madhan ravi
madhan ravi 2018 年 11 月 24 日
cellfun(@scatter,Time_s(1),P_1_1(1))

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by