大一matlab机考题目,最新版MATLAB机考样题(带答案)

MATLAB 机考样题:

(1)Generate and plot sequence 121[]2cos() [][4]8x n n and x n x n π==-, with 20n 20-≤≤.

n1=-20:20;

x1=2*cos(pi/8*n1)

n2=n1-4;

x2=2*cos(pi/8*n2)

subplot(211)

plot(n1,x1);

subplot(212)

plot(n2,x2)

(2)Write a MATLAB program to compute and plot the impulse response of a causal finite-dimensional discrete-time system characterized by a difference equation of the following form:

3]

-x[n 86.0 2]-1.32x[n 1]-0.34x[n x[n]8.13]-0.72y[n -2]-0.5y[n 1]-0.3y[n y[n]--+=++ N=input('请输入你要求的点数N=');

num=[1.8 0.34 -1.32 -0.86];

den=[1 0.3 0.5 -0.72];

x=[1 zeros(1,N-1)];

y=filter(num,den,x)

plot(0:N-1,y)

(3)Write a MATLAB program to compute and display the poles and zeros , to compute and display the second-order factored form , and to generate the pole-zero plot of a z-transform that is a ratio of two polynomials in z -1. Using this program to analyze the following G(z):

3

213

211768.018.052.115.1082.2393.61.8)(-------+++-+=z z z z z z z H num=[8.1 6.93 -23.82 10.5];

den=[1 1.52 0.18 -0.1768];

sos=tf2sos(num,den)

zplane(num,den)

(4)Try to give a program to evaluate the following DTFT in the range πω≤≤0 :

ω

ωωωω

ωωω4324321245535952)(j j j j j j j j e e e e e e e e z G --------++++++++=

%由于用freqz 计算频点至少是2个,所以至少输入两个频点

w1=input('请输入你要计算的频点w1=');

w2=input('请输入你要计算的频点w2=');

w=[w1 w2];

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值