How do i plot data from a structure? and extract data from a structure?
3 ビュー (過去 30 日間)
古いコメントを表示
Maximilian Jatzkowski
2018 年 11 月 27 日
コメント済み: Maximilian Jatzkowski
2018 年 11 月 27 日
Hi!
I have been given several tables of values, which cannot be opened, only read directly into matlab using the command "importdatat". When I do that, it saves the values in a structure, like below:
SpeedA=
struct with fields:
distanceA_km: [1716*1 double]
SpeedA_kmph: [1716*1 double]
My question is, how can now sort of "unpack" this structure, to plot it or see it in table/array/vector form? Plotting would help, as i am supposed to create a linear approximation of the values. I tried using struct2cell and then cell2mat, but that gives me all the values in one column, whereas they should appear in 2 columns, seperated between speed and distance. What do i ?
Thanks!
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!