impulse response from transfer function in matlab

조회 수: 37 (최근 30일)
pavan sunder
pavan sunder 2016년 1월 12일
댓글: Paul 2023년 12월 8일
i have a transfer function given by
H(z)= 1-z^(-1)/1-z^(-1)+z^(-2)
how to find its impulse response h(n) in matlab what is the code for the same ?

채택된 답변

Star Strider
Star Strider 2016년 1월 12일
This is how I would do it:
% H(z)= 1-z^(-1)/1-z^(-1)+z^(-2)
b = [1 -1];
a = [1 -1 1];
figure(1)
impz(b,a)
  댓글 수: 7
M.Moksha laxmi
M.Moksha laxmi 2021년 2월 21일
In the same problem what should I do if I want to plot the step response?
Star Strider
Star Strider 2022년 1월 12일
Use the stepz function
% H(z)= 1-z^(-1)/1-z^(-1)+z^(-2)
b = [1 -1];
a = [1 -1 1];
figure(1)
impz(b,a)
figure(2)
stepz(b,a)
.

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

추가 답변 (1개)

Abdul Jabbar
Abdul Jabbar 2016년 12월 10일
z^-1 -4z^-2 -2z^-4 can any one tell me that how i can find the impulse response of this function?
  댓글 수: 2
Petar Mostarac
Petar Mostarac 2023년 12월 8일
편집: Petar Mostarac 2023년 12월 8일
Is this a joke? :)
It is -1, -4 0 -2 and zeros to inf.
z^-1 is one sample delay, one step delay
Formarly, use basic knowladge to find H(z) in form H=b/a and then you can use:
h=impz(b,a, length_of_impulse_response)
In your question: b=[1 -4 0 -2] and a=[1 0 0 0]
If it is a joke, then is a good one :)
Paul
Paul 2023년 12월 8일
Actually, the solution with impz should have: b = [0 1 -4 0 -2]

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

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by