I am trying to extract data points from a graph plotted in scope (Simulink). I know about on option how to do it, when the plot is opened as a figure (Matlab):

// h = findobj(gca,'Type','line')

// x=get(h,'Xdata')

// y=get(h,'Ydata')

So I am using a “to workplace” block to save the data as a “structure with time”. Then I use the Simplot command and after it opens the plot as a figure. But when I am running the code, I am getting an empty array (Matlab 2016b). So I am looking for an option to extract data points so I can make a lookup table with the time increment of 0.1 s. I can do it manually via scope by data tracking, but it will take a lot of time. That’s why I was thinking about the option how to do it via a Matlab code.

Thank you in advance.

Similar questions and discussions