Question: 2. Determine the following for the MATLAB code shown in figure Q2, which computes the trigonometric Fourier series approximation for a periodic signal. The

2. Determine the following for the MATLAB code shown in figure Q2, 

2. Determine the following for the MATLAB code shown in figure Q2, which computes the trigonometric Fourier series approximation for a periodic signal. The angular velocity of the signal is equal to 1, i.e., w=1. a). Explain, briefly, the following code, support your discussion with a simple example. i) Line 03 t=0;0.1:2*pi. ii) Line 05 - The 'while' loop. [8 marks] [8 marks] b) Modify the program code to compute the Trigonometric Fourier series approximation for the following coefficients: a0 = 44, an=0 and bn = -22/n. The program should compute all integer multiples of the frequency starting with the first up to the eleventh harmonic. [9 marks] 01 w=1; 02 a0=15*pi; 03_t=0:0.1:2*pi; 04 n=4; 05 while n>=33 06 bn=-(30/(n)); 07 F=80+bn*sin(n*w*t); 08 fprintf('The result is %d ', n) 09 pause (0.5) 10 plot (t, F); 11 xlabel ('Time'); 12 ylabel ('Amplitude'); 13 title (['Harmonic ',num2str(n)]); 14 a0=F; 15 n=n+2; 16 end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!