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

2 vues (au cours des 30 derniers jours)
clearvars, clc,close all
G=tf([1],[1 10 20]) % the transfer function
step(G) % finding the step input

Réponse acceptée

Sam Chak
Sam Chak le 5 Avr 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 commentaires
Dyuman Joshi
Dyuman Joshi le 5 Avr 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by