MATLAB机考样题(带答案)

更新时间:2023-07-10 00:52:27 阅读: 评论:0

MATLAB机考样题(带答案)
MATLAB 机考样题:
(1)Generate and plot quence
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(2,1,1);
plot(n1,x1);
subplot(212);
plot(n2,x2); (2)Write a MATLAB program to compute and plot the impul respon 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 cond-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):
3213
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) %tf2sos 表示为1/z 的升幂
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];
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 respon of a causal LTI discrete-time system with a transfer function given by
2
三年级元宵节作文127.05.01)1(15.0)(---+--=z z z z H
num=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
()10.60.490.480.140.120.09H z z z z z z z ------=++---+
Using MATLAB to determine its zero locations and plot its magnitude and pha respon.
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 ()4cos0.1x t t t π=+, when using a sampling frequency f T = 20KHz, plot the magnitude and pha spectrum of the sampled quence(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,没有乘pi
ws=8*2/fs; %ws<1,没有乘pi
补习班招生宣传单ap=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 and pha respons and check if it meets the specifications?
ft=10;
fp=2;
fs=2.5;
wp=2*pi*fp/ft;
ws=2*pi*fs/ft;
什么是冠词
ds=0.005;
ap=20*log10(1-ds)
as=20*log10(ds)
wc=(wp+ws)/2;
dw=ws-wp;
M=ceil(3.11*pi/dw);
N=2*M;
b=fir1(N,wc/pi,hann(N+1));

本文发布于:2023-07-10 00:52:27,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1075033.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:输入   计算   样题   机考   频点   单位   马关条约   饮字
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图