how to shade between two discrete time step responses?

조회 수: 4 (최근 30일)
sudharsana rao
sudharsana rao 2018년 1월 23일
댓글: Birdman 2018년 1월 23일
how shade between two discrete time systems of step responses
  댓글 수: 5
sudharsana rao
sudharsana rao 2018년 1월 23일
편집: KSSV 2018년 1월 23일
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')

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

채택된 답변

Birdman
Birdman 2018년 1월 23일
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
sudharsana rao
sudharsana rao 2018년 1월 23일
thanks for this work, but still, this code is not giving shade to the entire sample
Birdman
Birdman 2018년 1월 23일
What did you expect?

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by