I plotted a signal using "To Workspace" in Simulink Matlab. Now I want to take the mean of the specific part of that signal which I plotted.How can I extract values from "To Workspace" or how can I take the mean of the specific area of that graph.
In "To workspace" you define a variable name, let's say: "simout" I made a simple simulink as the following:
you can save with different formats: Timeseries, Structure with time, Structure, Array. Then, when you run the simulink, it will save the variable in the worksapce as a structure. Then you can use the variable to plot the data inside. check this example : consider you saved using Structure with time you can get data like this:
t = simout.time
x = simout.signals.values
and you can plot the data:
plot(t,x)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.