How to get graph properties on Live script? e.g. Rise time, setting time etc.

3 views (last 30 days)
clearvars, clc,close all
G=tf([1],[1 10 20]) % the transfer function
step(G) % finding the step input

Accepted Answer

Sam Chak
Sam Chak on 5 Apr 2024
Can use the stepinfo() command.
G = tf(1, [1, 10, 20]) % the transfer function
G = 1 --------------- s^2 + 10 s + 20 Continuous-time transfer function.
stepinfo(G)
ans = struct with fields:
RiseTime: 0.8843 TransientTime: 1.5894 SettlingTime: 1.5894 SettlingMin: 0.0452 SettlingMax: 0.0500 Overshoot: 0 Undershoot: 0 Peak: 0.0500 PeakTime: 3.2966
step(G), grid on
  2 Comments
Dyuman Joshi
Dyuman Joshi on 5 Apr 2024
Hello @Nokuthula Teclar, if this answer solved your problem, please consider accepting the answer.
Note that accepting the answer indicates that your problem has been solved (which can be helpful to other people in future) and it awards the volunteer with reputation points for helping you.
You can accept only 1 answer for a question, but you can vote for as many answers as you want. Voting an answer also provides reputation points.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!