How I can define analytical function for calculate fft
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!