본문 바로가기

프로그래밍/MATLAB

[MATLAB] sin을 FFT 해도 순허수가 나오지 않는 이유

sin은 real 이고 odd 함수이기 때문에 푸리에 변환을 하면 순허수가 나와야 한다.

하지만 MATLAB에서 FFT를 해보면 복소수가 나온다. 

이는 DFT할때 우리가 입력한 신호를 주기 함수로 보기 때문에 첫 값과 끝 값이 중복되면 완전한 sin 함수가 아니기 때문이다.

 

(첫 값과 끝 값을 맞추어서 완전한 sin 함수가 되게 해도 plot 하면 실수축 값이 남아 있는데 실수축 값의 스케일을 보면 10의 -11승 이므로 거의 0과 동일하다.)

 

https://kr.mathworks.com/matlabcentral/answers/7475-fft-result-does-not-jive-with-theory-for-basic-sine-and-cosine

 

FFT result does not jive with theory for basic sine and cosine

If I create a simple sin(2*pi*.1*t) or same for a cos, and let t=[-50:50], and transform it, I get spikes in both the real and imaginary outputs. But Fourier transform theory says I should get onl...

kr.mathworks.com

 

'프로그래밍 > MATLAB' 카테고리의 다른 글

[MATLAB] 푸리에 변환 했을 때 복소수 값의 의미  (0) 2022.12.02
[MATLAB] plot3 vs mesh  (0) 2022.12.01