icft.m
来自「现代信号处理里的一些内容」· M 代码 · 共 39 行
M
39 行
function [ft,t]=ICFT(Fw,dw,w0);
if nargin==1
dw=2*pi;
w0=0;
elseif nargin==2
w0=0;
end
[ft,t]=CFT(conj(Fw),dw,w0);
ft=conj(ft)./(2.*pi);
N=length(Fw);
w=w0+[0:N-1]*dw;
f=w./(2.*pi);
if nargout==0
% Plot single-sided amplitude spectrum.
subplot(2,2,1);
plot(f,abs(Fw));
title('双边功率谱密度幅度');
xlabel('Frequency (Hz)');
ylabel('|F(f)|');
grid on;
subplot(2,2,2);
plot(f,angle(Fw));
title('双边功率谱密度相位');
xlabel('Frequency (Hz)');
ylabel('\phi(f)');
grid on;
subplot(2,2,3);
plot(t,abs(ft));
title('信号时域波形幅度');
xlabel('Time(s)');
ylabel('|f(t)|');
grid on;
subplot(2,2,4);
plot(t,angle(ft));
title('信号时域波形相位');
xlabel('Time(s)');
ylabel('\phi(t)');
grid on;
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?