傅里叶变换的初浅理解
2015-01-07 16:47
393 查看
function a_FS() %% »æ³öÔʼµÄÖÜÆÚÐźŠa = -5;b=5 t = a:0.01:b; f = t*0; t1 =t;t2= t;T =1.7;tao = 0.8; f( find(t>=-tao/2&t<=tao/2) ) = 1; figure;plot(t,f);axis([-1.5,1.5,0,1.2]); for i=1:5 t1 = t1-T;f( find(t1>=-tao/2&t1<=tao/2) ) = 1; t2 = t2+T;f( find(t2>=-tao/2&t2<=tao/2) ) = 1; end subplot(3,2,1) plot(t,f);axis([a,b,0,1.2]);legend( 'raw_signal' ); %% ÏÂÃæÇóCn N = 1000; w0 = 2*pi/T; % n=0ʱ£¬c0µÄϵÊýÊǶàÉÙÄØ C0 = tao /T; %CnÊÇËùÓÐÕýÏîµÄ¸µÀïҶϵÊý for n=1:N C(n) = (exp(-j*n*w0*tao/2)-exp(j*n*w0*tao/2)) / (-j*n*w0) /T; %CnÊÇËùÓÐÕýÏîµÄ¸µÀïҶϵÊý c(n) = (exp(j*n*w0*tao/2)-exp(-j*n*w0*tao/2)) / (j*n*w0) /T; %cnÊÇËùÓиºÏîµÄ¸µÀïҶϵÊý end for i=2:6 f = C0*exp(0*t); for n=1:i*4 f = f + C(n) * exp(j*n*w0*t) + c(n) * exp(-j*n*w0*t); end subplot(3,2,i); plot(t,f);axis([a,b,0,1.2]);legend( ['N=',num2str(i*4)] ); end figure; f = C0*exp(0*t); for n=1:32 f = f + C(n) * exp(j*n*w0*t) + c(n) * exp(-j*n*w0*t); plot(t,f);axis([a,b,0,1.2]);legend( 'N=32' );hold on;pause; end end
2. function a_FT(t,f,T,tao,A) %% »æ³öÔʼµÄÖÜÆÚÐźŠa = -5;b=5; t = a:0.01:b; f = t*0; t1 =t;t2= t;T =1.7;tao =0.8;A=1; f(find(t>=-tao/2&t<=tao/2) ) = A; plot(t,f);axis([a,b,0,1.2]);legend( 'raw_signal' ); %% ÏÂÃ渵ÀïÒ¶Õý±ä»» F0 =1*tao; n=1; for w=1:0.005:40 Fw = -A*(exp(j*w*tao/2)-exp(-j*w*tao/2))/(-j*w); %CnÊÇËùÓÐÕýÏîµÄ¸µÀïҶϵÊý F(n) = Fw;%ËùÓÐÕýÏò Fw = -A*(exp(-j*w*tao/2)-exp(j*w*tao/2))/(j*w); %CnÊÇËùÓÐÕýÏîµÄ¸µÀïҶϵÊý F_(n)=Fw;%ËùÓиºÊýÏî n=n+1; end figure; a = linspace(1,n-1,n-1); plot(a/200,F);xlabel('x=w') ;hold on;plot(-a/200,F_);%FF_ÊǹØÓÚwµÄÁ¬Ðøº¯Êý
相关文章推荐
- 十、从头到尾彻底理解傅里叶变换算法、上
- 浅入浅出理解傅里叶变换
- 理解傅里叶变换
- Matlab---傅里叶变换---通俗理解(一)
- 十、从头到尾彻底理解傅里叶变换算法、上
- 十、从头到尾彻底理解傅里叶变换算法、下
- 十、从头到尾彻底理解傅里叶变换算法、上
- 十、从头到尾彻底理解傅里叶变换算法、下
- 从头到尾彻底理解傅里叶变换算法、下
- 傅里叶变换的理解
- 正弦信号、傅里叶变换的理解
- 从头到尾彻底理解傅里叶变换算法、上
- 经典算法研究系列:十、从头到尾彻底理解傅里叶变换算法、下
- 十、从头到尾彻底理解傅里叶变换算法、下
- 傅里叶变换的通俗理解
- 从头到尾彻底理解傅里叶变换算法、上
- 傅里叶变换的理解和一些杂谈
- 傅里叶变换理解之二
- 从头到尾彻底理解傅里叶变换算法、下
- Matlab---傅里叶变换---通俗理解(二)