How I can define analytical function for calculate fft
1 次查看(过去 30 天)
显示 更早的评论
I have functionaly predefined signal fn(t) and his fourier transform fn1(f). If i try calculate values using fft, the results are differ from evaluated function fn1(f). How I can define function fn1 which calculate values whithout using fft?
clear; close all; clc;
T = 1;
N = 100;
a = 3;
F = N/T;
t = linspace(0, T-T/N, N) - T/2;
f = linspace(0, F-F/N, N) - F/2;
fn0 = @(t) exp(1i*a.*t.^2);
fn1 = @(f) sqrt(-2*1i*a).*exp(-1i*pi^2.*f.^2/a);
x = fn0(t);
y0 = fftshift(fft(x));
y1 = fn1(f);
plot(real(y0));
hold on;
plot(real(y1));
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!