## Deathfish 3 years ago What are the harmonic components of a sawtooth wave? Need first 10 harmonics... lesson on MATLAB, not fourier transform

1. fwizbang

You need to take the fourier transform of f(x) = x (-1<x <1).

2. Deathfish

hmm im using this to generate a waveform in MATLAB - supposed to sum together sine waves to get sawtooth wave of frequency 40 Hz, amplitude 4

3. Deathfish

MATLAB class, not calculus class ... so what are the first 10 harmonics?

4. fwizbang

Then I would suggest you use MATLAB's fft function to calculate the Fourier coefficients, or you could look here http://mathworld.wolfram.com/FourierSeriesSawtoothWave.html Be careful though there seems to be an algebra mistake on line 5

5. Deathfish

ok for the above equation from worlfram.. how to modify it for frequency 40 Hz, amplitude 4 ?

6. fwizbang

The period at Wolfram is 2L and the amplitude is 1. So multiply by 4 to get the amplitude right and set 40 Hz = 1/(2L) and solve for L to get the fundamental frequency correct.