How I can define analytical function for calculate fft

조회 수: 1 (최근 30일)
Leonid
Leonid 2018년 10월 6일
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개)

카테고리

Help CenterFile Exchange에서 Transforms에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by