How I can define analytical function for calculate fft
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!