what is the algorithm behind the fft2 and ifft2 in matlab?

조회 수: 2 (최근 30일)
Faris
Faris 2011년 4월 1일
답변: mohammed alenazy 2022년 3월 14일
what is the algorithm behind the fft2 and ifft2 in matlab?

답변 (2개)

Jan
Jan 2011년 4월 1일
The documentation of FFT, FFT2 and FFTW suggests, that the FFTW-library is used and you find more information on http://www.fftw.org.

mohammed alenazy
mohammed alenazy 2022년 3월 14일
It is this simple
tic; clc; clear all; close all; rng default
sf = 1000; Ts = 1/sf; t = (1:sf)*Ts;
cos_rad = @(theta) cosd(theta/pi*180); sin_rad = @(theta) sind(theta/pi*180);
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
x1 = 20*sin(2*pi*70*t)+20*sin(2*pi*50*t)+20*sin(2*pi*30*t); N = length(t);
N1 = length(x1);
X1 = [];
for(K1 = -N1/2:N1/2-1);
C1 = 1*cos_rad(2*pi*K1*t); S1 = 1*sin_rad(2*pi*K1*t);
x1C = x1.*C1; x1S = x1.*S1;
X1C1 = sum(x1C); X1S1 = sum(x1S);
X1C2 = X1C1.^2; X1S2 = X1S1.^2;
X1CS = sqrt(X1C2+X1S2);
X1CS1 = 2*X1CS/N1;
X1 = [X1 X1CS1];
end

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by