How do i plot data from a structure? and extract data from a structure?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Maximilian Jatzkowski
el 27 de Nov. de 2018
Comentada: Maximilian Jatzkowski
el 27 de Nov. de 2018
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 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Structures en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!