How to compare a struct with time to a step response?
1 view (last 30 days)
Show older comments
Imagine you have retrieved the step response of a system to a unit step in the form of a struct with time, stored in a mat file name 'Step_10'.
You then create a model of the system, and wind up with a nice MIMO transfer function 'H', which you successfully plot with:
stepplot(H)
How would you plot both the result of 'stepplot(H)' and the results from your .mat file on the same plot?
2 Comments
Guillaume
on 12 Jan 2018
Personally, I don't understand the "in the form of a struct with time". What are the fields of the structure? Is the structure an array or are the fields an array? Is the time one of the fields?
Answers (1)
Star Strider
on 12 Jan 2018
See the documentation on stepplot (link), and specifically Ways to Customize Plots (link), and the functions linked in the See Also section at the end of the page.
You will also find the get command helpful. (You may also need set.)
I leave the rest to you.
0 Comments
See Also
Categories
Find more on Structures 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!