how to shade between two discrete time step responses?

4 vues (au cours des 30 derniers jours)
sudharsana rao
sudharsana rao le 23 Jan 2018
Commenté : Birdman le 23 Jan 2018
how shade between two discrete time systems of step responses
  5 commentaires
sudharsana rao
sudharsana rao le 23 Jan 2018
Modifié(e) : KSSV le 23 Jan 2018
T=0.01;
z=tf('z',T)
s1=tf([1 3 8],[6 9 4.9 0.8]);
s2=tf([2 4 10],[6 9.5 5 0.85],T);
t=0:0.1:3;
[y1,t] = step(s1,t);
[y2,t] = step(s2,t);
fill([t fliplr(t)],[y2 fliplr(y1)],'r')

Connectez-vous pour commenter.

Réponse acceptée

Birdman
Birdman le 23 Jan 2018
T=0.01;
z=tf('z',T)
s1=tf([1 3 8],[6 9 4.9 0.8]);
s2=tf([2 4 10],[6 9.5 5 0.85],T);
t=0:0.01:3;
[y1,t] = step(s1,t);
[y2,t] = step(s2,t);
fill([t.' fliplr(t.')],[y2.' fliplr(y1.')],'r')
with the above code, you get the plot in attached figure. Hope this helps.
  2 commentaires
sudharsana rao
sudharsana rao le 23 Jan 2018
thanks for this work, but still, this code is not giving shade to the entire sample
Birdman
Birdman le 23 Jan 2018
What did you expect?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by