y[n] = x[n] - x[n-1] x[n-2] I need to find a) Find the transfer function. b) Give the impulse response. d) Sketch the frequency respo

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]

4 件のコメント

Steven Lord
Steven Lord 2020 年 4 月 6 日
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Rhea Shah
Rhea Shah 2020 年 4 月 6 日
clc;
clear all;
close all;
num=[1.0 -1.0 1.0]
den=[1.0]
y=impz(nu,den);
stem(y);
Steven Lord
Steven Lord 2020 年 4 月 6 日
Okay. What is your specific question about where you're having difficulty?
Rhea Shah
Rhea Shah 2020 年 4 月 7 日
Is the approach corect?

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

回答 (1 件)

Birdman
Birdman 2020 年 4 月 7 日
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)

5 件のコメント

Rhea Shah
Rhea Shah 2020 年 4 月 7 日
tf is giving an error
Birdman
Birdman 2020 年 4 月 7 日
It is working well in R2019b. Which version are you using?
Rhea Shah
Rhea Shah 2020 年 4 月 7 日
R2020a
Do you have Control System Toolbox installed? Type
ver
in command line and paste the output here.
Rhea Shah
Rhea Shah 2020 年 4 月 9 日
Hey thank you so much. I got the impulse and frequency response output. But i am not getting transfer function output as I don't have the tool box installed. I have the 2019a version. Is there some another approach to it?

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

カテゴリ

ヘルプ センター および File ExchangeGet Started with Control System Toolbox についてさらに検索

製品

タグ

質問済み:

2020 年 4 月 6 日

コメント済み:

2020 年 4 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by