How to compare a struct with time to a step response?

조회 수: 1 (최근 30일)
Mike Meyers
Mike Meyers 2018년 1월 12일
댓글: Mike Meyers 2018년 1월 12일
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
Guillaume
Guillaume 2018년 1월 12일
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?
Mike Meyers
Mike Meyers 2018년 1월 12일
You're pretty much correct - the fields are arrays, and time is one of the two fields - signals (which holds all the measured values) and time. At least I think the relevant terminology is correct... I'm rather new to Matlab

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2018년 1월 12일
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.

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by