91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-14
  • 語言: Matlab
  • 標簽: matlab??

資源簡介

窗口傅里葉正反變換matlab程序,同時包含使用的例子程序

資源截圖

代碼片段和文件信息

%Program?for?plotting?spectrum?and?error?of?windowed?Fourier?transform
clear;clc;

%Add?path
addpath([cd‘\lib‘]);

%Define?signal?
L=2^10;
dt=1/L;
t=(0:L-1)*dt;
f0=100;?%Constrat?sine?signal
s=sin(2*pi*f0*t.^3);?
%?f1=100;f2=200;f3=300;f4=400;%Construnct?four?frequencies?signal
%?jump1=fix(L/4);jump2=fix(2*L/4);jump3=fix(3*L/4);
%?s=[sin(2*pi*f1*t(1:jump1))sin(2*pi*f2*t(jump1+1:jump2))sin(2*pi*f3*t(jump2+1:jump3))sin(2*pi*f4*t(jump3+1:end))];
%?f0=100;?%Construct?Ricker?signal
%?t0=fix(L/2)*dt;
%?s=(1-2*(pi*f0*(t-t0)).^2).*exp(-(pi*f0*(t-t0)).^2);
%?s=zeros(1L);?%Construct?Delta?signal
%?s(fix(L/2))=1;?

%Define?window?function
epsilon=1e-3;
alpha=2*log(1/epsilon)/((fix(sqrt(L))*dt)^2);?%Assume?a?point?radius?of?fix(sqrt(L))
w=@(x)exp(-alpha/2*x.^2);??%構造高斯窗
S=wft(swdt);???%進行窗口傅里葉變換

%Plot?reconstruction?error
subplot(212);
s0=iwft(Swdt);
xIndex=(0:L-1)*dt;
plot(xIndexs-s0);
axis?tight;
xlabel(‘t(s)‘);ylabel(‘error‘);
title(‘重構誤差圖‘);

%Plot?spectrum
subplot(211);
S=S(1:fix(L/2)+1:);
[mn]=size(S);
x=(1:n)*dt;
df=1/(L*dt);
y=(1:m)*df;
%mesh(xyabs(S).^2);
pcolor(xyabs(S).^2);
shading?interp;
axis?tight;
xlabel(‘t(s)‘);
ylabel(‘f(Hz)‘);
title(‘譜圖‘);
colormap(‘jet‘);

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-12-10?17:24??窗口傅里葉變換\
?????目錄???????????0??2018-12-10?17:24??窗口傅里葉變換\lib\
?????文件?????????580??2018-12-11?16:58??窗口傅里葉變換\lib\iwft.m
?????文件?????????610??2018-12-11?16:58??窗口傅里葉變換\lib\wft.m
?????文件????????1268??2018-12-14?11:27??窗口傅里葉變換\plot_spectrum_and_error.m

評論

共有 條評論