Skip to main content
got rid of all of the unnecessary parens - order of operations is preserved. Renamed variables to more commonly used (and shorter to fit on one screen) terms.
Source Link

Sawtooth Wave

Hi all, I've been trying to zero centre a waveform prior to IFFT. my recent attempts are based on the following code which is producing the waveform below. I don't understand why this isn't working or why there are notches in the sawtooth wave. Is my math incorrect?

The following code: double dZeroStartRadianValue = (((k_dTWOPI * a_dFundamentalFrequency) / a_dSampleRate) * (a_zFFTSize * 0.50) * -1.0); // This zero centers snippet is used to center it.

zeroStartRadianValue = 2*PI*f0/fs*NFFT*0.50*-1.0;

Sawtooth Wave

Hi all, I've been trying to zero centre a waveform prior to IFFT. my recent attempts are based on the following code which is producing the waveform below. I don't understand why this isn't working or why there are notches in the sawtooth wave. Is my math incorrect?

code: double dZeroStartRadianValue = (((k_dTWOPI * a_dFundamentalFrequency) / a_dSampleRate) * (a_zFFTSize * 0.50) * -1.0); // This zero centers it.

Sawtooth Wave

Hi all, I've been trying to zero centre a waveform prior to IFFT. my recent attempts are based on the following code which is producing the waveform below. I don't understand why this isn't working or why there are notches in the sawtooth wave. Is my math incorrect?

The following code snippet is used to center it.

zeroStartRadianValue = 2*PI*f0/fs*NFFT*0.50*-1.0;
Source Link
cixelsyd
  • 93
  • 1
  • 11

Phase Issue in IFFT

Sawtooth Wave

Hi all, I've been trying to zero centre a waveform prior to IFFT. my recent attempts are based on the following code which is producing the waveform below. I don't understand why this isn't working or why there are notches in the sawtooth wave. Is my math incorrect?

code: double dZeroStartRadianValue = (((k_dTWOPI * a_dFundamentalFrequency) / a_dSampleRate) * (a_zFFTSize * 0.50) * -1.0); // This zero centers it.