| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 775 人关注过本帖
标题:大家帮忙指正 一下
只看楼主 加入收藏
硬度为7
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-8-12
收藏
 问题点数:0 回复次数: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];
2008-01-04 14:38
快速回复:大家帮忙指正 一下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020184 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved