How do I plot multiple fields in one graph, which are stored in a 1x1 structure?

Hi,
i want to plot the two lower fields on the y-Axis and the upper field as time on the x-axis. The problem is, that the fields are stored in a 1x1 structure and i can't figure out, how to do that. One idea was to imported the .mat and choose the option to store the data as vectors - unfortunately this option was not choosable.
I would love some help for this question, thanks in advance!

 Accepted Answer

Continue using the dot notation to access each field of your structure. I think something like this should work:
x = Erodierversuch_Schnitt.Erodierversuch_Schnitt_1.Zeit
a = Erodierversuch_Schnitt.Erodierversuch_Schnitt_1.Spannung_90Grad_unten_a;
b = Erodierversuch_Schnitt.Erodierversuch_Schnitt_1.Spannung_0Grad_unten_b;
plot(x,a,x,b)

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!