How to plot output y(t) of LTI system, where impulse response h(t) and input x(t) are given?

16 ビュー (過去 30 日間)
Szalka Gergo
Szalka Gergo 2021 年 10 月 24 日
編集済み: Paul 2021 年 10 月 25 日
I would like to determine and plot a LTI system's output [ y(t) ] .
I know that y(t) can be determined by convolving input and impulse response, or y(t) = x(t) * h(t), but I can't figure out how to plot output correctly.
  3 件のコメント
Szalka Gergo
Szalka Gergo 2021 年 10 月 24 日
編集済み: Szalka Gergo 2021 年 10 月 24 日
Yes, ε(t) should represent the unit step function. I just want to plot y(t), closed form expression is not required.
Paul
Paul 2021 年 10 月 24 日
編集済み: Paul 2021 年 10 月 25 日
x(t) does not include that term ε(t) . So as written x(t) is non-zero for t < 0. Is that the correct interpretation of x(t)?

サインインしてコメントする。

回答 (1 件)

Yongjian Feng
Yongjian Feng 2021 年 10 月 24 日
Do you mean:
  1. create a list of t
  2. compute y for the list of t above
  3. plot(t, y)
  2 件のコメント
Szalka Gergo
Szalka Gergo 2021 年 10 月 24 日
編集済み: Szalka Gergo 2021 年 10 月 24 日
Yes, definitely. I wrote a new code, but I'm not sure if it's good...
t=linspace(0,10,100);
h=4 * exp(-t); % imp. response : h(t) = 4ε(t)e^-t
x=8 * exp(2*t); % input : x(t) = 8e^2t
y=conv(h,x);
figure
subplot(3,1,1)
plot(t,h); title h(t)
subplot(3,1,2)
plot(t,x); title x(t)
subplot(3,1,3)
plot(t,y(1:100)) ; title y(t)
Figure:
Yongjian Feng
Yongjian Feng 2021 年 10 月 25 日
Well one way to verify is to pick several points of t, compute x(t), h(t) and y(t) by hand (or say use a calculator). Then verify y(t) on the figure is correct.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTime and Frequency Domain Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by