⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex3p12.m

📁 关于数字信号处理的一些matlab例程
💻 M
字号:
n=-5:10;x=sin(pi*n/2);
k=-100:100;w=(pi/100)*k;
X=x*(exp(-j*pi/100)).^(n'*k);
[xe,x0,m]=evenodd(x,n);
XE=xe*(exp(-j*pi/100)).^(m'*k);
X0=x0*(exp(-j*pi/100)).^(m'*k);
XR=real(X);
error1=max(abs(XE-XR))
XI=imag(X)
error2=max(abs(X0-j*XI))
subplot(1,1,1)
subplot(2,2,1);plot(w/pi,XR);grid;axis([-1,1,-2,2])
xlabel('frequency in units of pi');ylabel('Re(x)');
title('real part od X')
subplot(2,2,2);plot(w/pi,XI);grid;axis([-1,1,-10,10])
xlabel('frequency in units of pi');ylabel('Im(x)');
title('imaginary part od X')
subplot(2,2,3);plot(w/pi,real(XE));grid;axis([-1,1,-2,2])
xlabel('frequency in units of pi');ylabel('Re(XE)');
title('transfrm of even part')
subplot(2,2,4);plot(w/pi,imag(X0));grid;axis([-1,1,-10,10])
xlabel('frequency in units of pi');ylabel('X0)');
title('transform of odd part')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -