作业帮 > 数学 > 作业

求matlab高手,线性时不变系统,差分方程如下y(n)-0.5y(n-1)+0.25y(n-2)=x(n)+2x(n-

来源:学生作业帮 编辑:作业帮 分类:数学作业 时间:2024/05/15 12:34:42
求matlab高手,线性时不变系统,差分方程如下y(n)-0.5y(n-1)+0.25y(n-2)=x(n)+2x(n-1)+x(n-3)
a.\x05确定系统的稳定性
提示:用zplane( )函数画出零点极点图,看是否极点全在单位圆内.
b.\x05在 之间求得并画出系统的脉冲响应,从脉冲响应确定系统的稳定性
提示:可以调用impz( )函数
c.\x05如果此系统的输入为x(n)=[5+3cos(0.2π(派)n)+4sin(0.6п(派)n)]u(n)
在0≤n≤100间求出y(n)响应
提示:可以调用filter( )函数
clc;clear;Y_vect = [1 -0.5 0.25];     %   Coefficient of numeratorX_vect = [1 2 0 1];         %   Coefficient of denominatorfigure(1)                   %   Figure of Z-plane, "*" means polars, "o" means zeros.zplane(Y_vect, X_vect);figure(2)                   %   Figure of Time-domain Impulse responseimpz(Y_vect, X_vect);legend('h(n)')t = 0 : 100Input = 5 + 3*cos(0.2*pi*t) + 4*sin(0.6*pi*t) ; %   Generate input signalOutput = filter(Y_vect, X_vect, Input);         %   Response of input signalfigure(3)                   %   Figure of Response for x(n)subplot(2,1,1);stem(Input, 'filled');legend('x(n)')subplot(2,1,2);stem(Output,'filled');legend('y(n)')多给点分,谢谢!