Please answer using written program in C language!! :) Part 2: (10 marks) voltFourierSqWave Function Fourier Analysis i...
Part 2: (10 marks) voltFourierSqWave Function Fourier Analysis is used to break down a complex periodic waveform into its fundamental frequency and harmonics of the fundamental. The harmonics are frequencies that are whole number multiples of the fundamental frequency. For a squarewave only the odd harmonics are considered. For example, for a 1kHz squarewave, the 1ST Harmonic is 1kHz, 3RD Harmonic is 3kHz, 5TH Harmonic is 5kHz, etc. The voltage at each of each even harmonic is zero while the odd harmonics can be calculated by the formula: for n odd harmonics and A is the peak voltage nt Write a function named voltFourierSqWave, which inputs peak voltage and the harmonic (ie 1, 2, 3,4, 5,..) decimal places. Demonstrate the function in a complete program by asking the user to enter peak voltage and harmonic from the keyboard. The program then calls the function and displays voltage at that harmonic. arguments and returns the voltage with a precision of 4 as
Part 2: (10 marks) voltFourierSqWave Function Fourier Analysis is used to break down a complex periodic waveform into its fundamental frequency and harmonics of the fundamental. The harmonics are frequencies that are whole number multiples of the fundamental frequency. For a squarewave only the odd harmonics are considered. For example, for a 1kHz squarewave, the 1ST Harmonic is 1kHz, 3RD Harmonic is 3kHz, 5TH Harmonic is 5kHz, etc. The voltage at each of each even harmonic is zero while the odd harmonics can be calculated by the formula: for n odd harmonics and A is the peak voltage nt Write a function named voltFourierSqWave, which inputs peak voltage and the harmonic (ie 1, 2, 3,4, 5,..) decimal places. Demonstrate the function in a complete program by asking the user to enter peak voltage and harmonic from the keyboard. The program then calls the function and displays voltage at that harmonic. arguments and returns the voltage with a precision of 4 as