Fill This Form To Receive Instant Help

#### Matlab Assignment The Fourier series for a sawtooth wave with period 2L can be expressed as: f(t) = - 2/p S¥n=1sin(npt)/n Write a Matlab program to do the following: Ask the user to input the number of terms of the Fourier series to calculate, and the period of the sawtooth wave

###### Math

Matlab Assignment

The Fourier series for a sawtooth wave with period 2L can be expressed as:

f(t) = - 2/p S¥n=1sin(npt)/n

Write a Matlab program to do the following:

• Ask the user to input the number of terms of the Fourier series to calculate, and the period of the sawtooth wave.
• Calculate the sawtooth wave using the Fourier series, for values of t from 0 to 10 in steps of 0.01.
• Plot the sawtooth wave superimposed on a similar waveform generated using Matlab’s sawtooth function.
• There is a difference between the Fourier series waveform and the waveform generated using the sawtooth function. Plot the error (the sum of the absolute values of the difference at each value of f) for the range of terms from 1 to the number of terms input by the user. An example plot is below where the user has asked for the calculation to be done using 100 terms.