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

📄 sy3_fft_lp.html

📁 这是我们这周数字信号处理课程设计的论文
💻 HTML
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">   <head>      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <!--This HTML is auto-generated from an M-file.To make changes, update the M-file and republish this document.      -->      <title>sy3_fft_lp</title>      <meta name="generator" content="MATLAB 7.0">      <meta name="date" content="2008-12-25">      <meta name="m-file" content="sy3_fft_lp"><style>body {  background-color: white;  margin:10px;}h1 {  color: #990000;   font-size: x-large;}h2 {  color: #990000;  font-size: medium;}p.footer {  text-align: right;  font-size: xx-small;  font-weight: lighter;  font-style: italic;  color: gray;}pre.codeinput {  margin-left: 30px;}span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}span.untermstring {color: #B20000}span.syscmd {color: #B28C00}pre.showbuttons {  margin-left: 30px;  border: solid black 2px;  padding: 4px;  background: #EBEFF3;}pre.codeoutput {  color: gray;  font-style: italic;}pre.error {  color: red;}/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows.  On Gecko-based browsers, the shrink-to-fit doesn't work. */ p,h1,h2,div {  /* for MATLAB's browser */  width: 600px;  /* for Mozilla, but the "width" tag overrides it anyway */  max-width: 600px;  /* for IE */  width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}    </style></head>   <body><pre class="codeinput"><span class="comment">%&Acirc;&Euml;&sup3;&yacute;cos(2*pi/3*n)</span>omegap=pi/4;Apmax=3;omegar=2/3*pi;Armin=50;T=5*pi*10^(-6);wp=[omegap/pi];wr=[omegar/pi];[N,wc]=buttord(wp,wr,Apmax,Armin,<span class="string">'s'</span>);[b,a]=butter(N,wc,<span class="string">'low'</span>);sysl=tf(b,a)w=linspace(0,2*pi,500);h=freqz(b,a,w);length(h)mag=fftshift(20*log10(abs(h)));n=0:23;x=1+cos(pi/4*n)+cos(2*pi/3*n);X=fft(x,500);X1=fftshift(X);omega=2*pi/500*([0:499]);Y=fftshift(X.*h);title(<span class="string">'&Ocirc;&shy;&ETH;&Aring;&ordm;&Aring;'</span>);ylabel(<span class="string">'&middot;&ugrave;&para;&Egrave;'</span>);xlabel(<span class="string">'&AElig;&micro;&Acirc;&Ecirc;'</span>);subplot(3,1,1);plot(omega,abs(X1));axis([0,2*pi,0,35]);title(<span class="string">'&Acirc;&Euml;&sup2;&uml;&AElig;&divide;&middot;&ugrave;&AElig;&micro;&Iuml;&igrave;&Oacute;&brvbar;'</span>);ylabel(<span class="string">'Gain(dB)'</span>);xlabel(<span class="string">'Frequency(rad)'</span>);subplot(3,1,2);plot(w,mag);axis([0,2*pi,-100,5]);subplot(3,1,3);plot(omega,abs(Y));axis([0,2*pi,0,25]);</pre><pre class="codeoutput"> Transfer function: 0.00117 s^6 + 0.00702 s^5 + 0.01755 s^4 + 0.0234 s^3 + 0.01755 s^2 + 0.00702 s                                                                                                                                                         + 0.00117                                                                                --------------------------------------------------------------------------------    s^6 - 2.914 s^5 + 3.989 s^4 - 3.108 s^3 + 1.433 s^2 - 0.3663 s + 0.04031 ans =   500</pre><img vspace="5" hspace="5" src="sy3_fft_lp_01.png"> <p class="footer"><br>         Published with MATLAB&reg; 7.0<br></p>      <!--##### SOURCE BEGIN #####%cos(2*pi/3*n)
omegap=pi/4;Apmax=3;
omegar=2/3*pi;Armin=50;
T=5*pi*10^(-6);
wp=[omegap/pi];wr=[omegar/pi];
[N,wc]=buttord(wp,wr,Apmax,Armin,'s');
[b,a]=butter(N,wc,'low');
sysl=tf(b,a)
w=linspace(0,2*pi,500);
h=freqz(b,a,w);
length(h)
mag=fftshift(20*log10(abs(h)));
n=0:23;
x=1+cos(pi/4*n)+cos(2*pi/3*n);
X=fft(x,500);
X1=fftshift(X);
omega=2*pi/500*([0:499]);
Y=fftshift(X.*h);


title('');
ylabel('路霉');xlabel('');
subplot(3,1,1);plot(omega,abs(X1));axis([0,2*pi,0,35]);

title('篓梅路霉矛');
ylabel('Gain(dB)');xlabel('Frequency(rad)');
subplot(3,1,2);plot(w,mag);axis([0,2*pi,-100,5]);

subplot(3,1,3);
plot(omega,abs(Y));axis([0,2*pi,0,25]);
##### SOURCE END #####-->   </body></html>

⌨️ 快捷键说明

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