Fourier transform how to get coefficients

조회 수: 27 (최근 30일)
Vincent Sin
Vincent Sin 2018년 12월 15일
댓글: Star Strider 2018년 12월 15일
Hey everyone, i know that matlab have the method for fourier transform implemented but i was wondering if there is anything that could give me coefficients of fourier transfrom.

채택된 답변

Star Strider
Star Strider 2018년 12월 15일
With the MATLAB fft function, at each frequency, the real value is the cosine coefficient, and the imaginary value is the sine coefficient.
At least that is how I understand it.
  댓글 수: 12
Vincent Sin
Vincent Sin 2018년 12월 15일
And how would you understand that we should use only 1/3 of values to draw that picture?
Star Strider
Star Strider 2018년 12월 15일
You can use any subset you like. This is just an example.
Another option might be to take an arbitrary subset of the transformed matrix:
idx = randperm(numel(P), fix(numel(P)/3));
sbs = ind2sub(size(Y), idx);
S = false(size(Y));
S(sbs) = 1;
Ys = Y.*S;
P2 = ifft(Ys);
figure
imagesc(abs(P2))
Try this on the original and the ‘Y’ array after using fftshift.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

madhan ravi
madhan ravi 2018년 12월 15일

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by