Question: Write a user-defined MATLAB function that takes as input the trigonometric Fourier coefficients a0 as a scalar and an and bn as vectors, along
Write a user-defined MATLAB function that takes as input the trigonometric Fourier coefficients a0 as a scalar and an and bn as vectors, along with the total signal power, Px. and maximum harmonic to retain, hmax, as scalars. The function should calculate and return the percentage of the power of the signal represented by including all harmonics up to hmax. Be sure to conduct error checking in the function, and in particular, check to make sure that hmax does not exceed the harmonics given in an and bn. Name the function as follows: function Percent Power = CalcPercent Power (a0, an, bn, Px, hmax)
Step by Step Solution
3.45 Rating (142 Votes )
There are 3 Steps involved in it
Heres a MATLAB function based on your specifications function PercentPower CalcPercentPowera0 an bn ... View full answer
Get step-by-step solutions from verified subject matter experts
