Why do I get a phase = 0 when I add a constant to a sinusoidal wave?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone, say you have x = A*sin(wt + phi) + A0 where A0 is a constant. When I do fft on x and try to get the phase, I always get 0. Why is that? Is it because the wave is shifted up so it is no longer considered a sinusoidal wave? Thank you
댓글 수: 2
채택된 답변
Wayne King
2013년 2월 22일
That should not happen
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = 2+cos(2*pi*100*t-pi/4);
xdft = fft(x);
% now look at the DFT corresponding to 100 Hz
xdft(101)
angle(xdft(101))
Can you please show your code, as you see above, adding a DC shift does not give you a phase of 0.
댓글 수: 2
Wayne King
2013년 2월 22일
direct current. It is a synonym for a shift in the mean value of the waveform, or the equivalently the frequency content at f = 0.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!