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

41528d3028836879cd698677c3999917.gifMATLAB机考样题(带答案)

MATLAB 机考样题:(1)Generate and plot sequence , 1 21[]2cos() [][4]8xnnadxnwith .20nn1=-20:20;x1=2*cos(pi/8*n1);n2=n1-4;x2=2*cos(pi/8*n2);subplot(2,1,1);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 : 3]-x[n86.0 2]-1.3x[n]-.4[13]-0.72y[n-].5y[n1]-0.3y[n[] N=( 请输入你要求的点数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 , and to generate the pole-zero plot of a z-trans that is a ratio of two polynomials in z-1. Using this program to analyze the following G(z): 3211768.08.52. 53968)( zzzzHnum=[8.1 6.93 -23.82 10.5];den=[1 1.52 0.18 -0.1768];sos=tf2sos(num,den) %tf2sos表示为1/z的升幂zplane(num,den)(4)Try to give a program to uate the following DTFT in the range 0 :432145592)( jjjj jjjj eeezG%由于用freqz计算频点至少是2个,所以至少输入两个频点w1=( 请输 入你要计算的 频点w1= );w2=( 请输 入你要计算的 频点w2= );w=[w1 w2];num=[2 5 9 5 3];den=[5 45 2 1 1];h=freqz(num,den,w)(6)Write a MATLAB program to compute and plot the magnitude response of a causal LTI discrete-time system with a transfer function given by217.05.)()( zzzHnum=0.15*[1 0 -1];den=[1 -0.5 0.7];[h,w]=freqz(num,den,512);plot(w/pi,abs(h));(7)Consider the following FIR transfer function:123456()0.6.490.8.10.2.09Hzzzzzzz Using MATLAB to determine its zero locations and plot its magnitude and phase response.h=[1 0.6 .49 -0.48 -0.14 -0.12 0.09];figure(1)zplane(h,1);[H,w]=freqz(h,1,512);figure(2)plot(w/pi,abs(H));figure(3)plot(w/pi,angle(H));(8)Given a signal , when using a sampling frequency ()4cos0.1xtttfT= 20KHz, plot the magnitude and phase spectrum of the sampled sequence(given length-64).fs=2e4;n=0:63;x=4*n/fs+cos(0.1*pi*n/fs);h=fft(x,1024);figure(1);plot(0:2/1023:2,abs(h));figure(2);plot(0:2/1023:2,angle(h));(9)design an IIR butterworth digital lowpass filter with the following specifications: sampling rate of 40kHz, passband edge frequency of 4kHz, stopband edge frequency of 8kHz, passband ripple of 0.5dB, and a minimum stopband attenuation of 40dB,plot frequency-magnitude and check if your design fits the specification.fs=40;wp=4*2/fs; %wp<1,没有乘 piws=8*2/fs; %ws<1,没有乘 piap=0.5;as=40;[n,wn]=buttord(wp,ws,ap,as);[num,den]=butter(n,wn);[h,w]=freqz(num,den,512);figure(1);plot(w/pi,20*log10(abs(h)));axis([0 1 -50 0]);figure(2);subplot(2,1,1);plot(w/pi,20*log10(abs(h)))axis([0 wp -0.5 0]);title( 通带纹 波 );subplot(2,1,2);plot(w/pi,20*log10(abs(h)));axis([ws 1 -50 -30]);title( 阻带纹 波 );(10)Design a Hanning FIR lowpass filter meeting the following specifications: passband edge frequency=2kHz, stopband edge frequency=2.5kHz, passband ripple δp=0.005, stopband rippleδs=0.005, and sampling rate of 10kHz.Plot its gain a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值