127 views (last 30 days)

I need to find a) Find the transfer function. b) Give the impulse response. d) Sketch the frequency response. How to do it?

[n] = x[n] - x[n-1] + x[n-2]

Birdman
on 7 Apr 2020

Try this:

z=tf('z',0.001);

Gz=1-z^-1+z^-2;

%%transfer function

Gs=d2c(Gz,'tustin')

%%impulse response

figure(1);

impulse(Gs)

%%frequency response

figure(2);

bode(Gs)

Birdman
on 7 Apr 2020

Do you have Control System Toolbox installed? Type

ver

in command line and paste the output here.

Opportunities for recent engineering grads.

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

Start Hunting!
## 4 Comments

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_822432

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_822432

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_822441

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_822441

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_822481

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_822481

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_823122

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/515819-y-n-x-n-x-n-1-x-n-2-i-need-to-find-a-find-the-transfer-function-b-give-the-impulse-resp#comment_823122

Sign in to comment.