フィルターのクリア

How do i plot data from a structure? and extract data from a structure?

3 ビュー (過去 30 日間)
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!

採用された回答

Fangjun Jiang
Fangjun Jiang 2018 年 11 月 27 日
[SpeedA.distanceA_km, SpeedA.SpeedA_kmph]

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by