Question: Matlab question do the problen 4.1 and 4.2, please show the answer on the matlab. Thanks 4.1 Fourier Series Analysis Function Write a Matlab function
4.1 Fourier Series Analysis Function Write a Matlab function "findFS" which takes as inputs Is, a vector of samples of ox) covering one period of r(t); k, the index of the desired coefficient; the period T, and the sampling time : ind produces as output the approximate an coefficient according to (3) Note that you can easily take advantage of vectorization by considering the product of the row vector sy and the column vector swaston A template for the function is provided 4.2 Fourier Series Coefficients of a Square Wave Let's construct n test signal. Define in Matlab *T-fones (1000,1);zeros(1000,1)); This is one period of a square wave signal. Let the fundamental period be T = 0.045, a) Calculate the sampling time, and explain your answer: (Hint: T. - T/2000) 1) Use the function you wrote in the previous exercise to compute ao , and a ) Find 0-1, 1-2, und a.. How do these relate to a, a, anda? d) Verify the coutficients you have computed approacitate consonably will the actual coefficients you obtained for the prelab 12 4.1 Fourier Series Analysis Function Write a Matlab function "findFS" which takes as inputs Is, a vector of samples of ox) covering one period of r(t); k, the index of the desired coefficient; the period T, and the sampling time : ind produces as output the approximate an coefficient according to (3) Note that you can easily take advantage of vectorization by considering the product of the row vector sy and the column vector swaston A template for the function is provided 4.2 Fourier Series Coefficients of a Square Wave Let's construct n test signal. Define in Matlab *T-fones (1000,1);zeros(1000,1)); This is one period of a square wave signal. Let the fundamental period be T = 0.045, a) Calculate the sampling time, and explain your answer: (Hint: T. - T/2000) 1) Use the function you wrote in the previous exercise to compute ao , and a ) Find 0-1, 1-2, und a.. How do these relate to a, a, anda? d) Verify the coutficients you have computed approacitate consonably will the actual coefficients you obtained for the prelab 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
