Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
回复
 
主题工具 显示模式
旧 2008-01-04, 13:03   #1
天天天下
初级会员
 
注册日期: 2007-12-28
帖子: 2
声望力: 0
天天天下 正向着好的方向发展
默认 【求助】请大家指正一下

刚刚学matlab有关数字信号处理的部分,做了几道题,大家帮忙看一下还有改进的地方没有,谢谢咯
1.Write a MATLAB program to compute and plot the response of input as and a causal finite-dimensional discrete-time system characterized by a difference equation of the following form:y[n]+0.3y[n-1]+0.5y[n-2]-0.72y[n-3]=1.8x[n]+0.34x[n-1]-1.32x[n-2]-0.86x[n-3]
solution:
b=[1.8,0.34,-1.32,-0.86];
>> a=[1,0.3,0.5,-0.72];
>> [h,t]=impz(b,a,31);
>> n=0:30;
>> x=cos(0.2*pi*n);
>> y=conv(x,h);
>> plot(y);
这个地方有一点不会,它要求前31个响应,应该怎么弄啊?
另外,我看过差分方程的一种解法,里面给出了y[-1],y[-2],x[-1],x[-2]的值,然后用的filtic求的,这样的没有给y[-1],y[-2],x[-1],x[-2]值的题能不能用那种方式求解啊

2.Writing a MATLAB program to compute the linear convolution of two length-N sequences. Using this program to determine the following pair of sequences:
g[n]={1+j4, 6-3j, 0, 3, -j4}, h[n]={-3-j2, -1, 1+j2, 6+j3, 1-j2} 0<=n<=4
solution:
N=input('please input the lenth of the two sequence\n');
g=input('\nplease input a sequence');
h=input('\nplease input a sequence');
y=conv(g,h);
3.Write a MATLAB program to compute and plot the impulse response of a causal finite-dimensional discrete-time system characterized by a transfer function of the following form: H(Z)=1-3.5Z^-1+4.9Z^-2-3.43Z^-3+1.2005Z^-4-0.16807Z^-5
solution
%From the expression we know y[n]=x[n]-3.5x[n-1]+4.9x[n-2]-3.43x[n-3]+1.2005x[n-4]-0.16807x[n-5];
b=[1,-3.5,4.9,3.43,1.2005,-0.16807];
a=[1];
[h,t]=impz[b,a,41];
天天天下 当前离线   回复时引用此帖
回复

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 17:17


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.