Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use MATLAB and make sure to write the code correctly which the code will fill the table by using ( fprintf ) Before upload
Please use MATLAB and make sure to write the code correctly which the code will fill the table by using ( fprintf )
Before upload your answer please make sure it is correct..
Part 4 (30 points): It is required to use Matlab to compute the total power for each of the signals specified in the table given in Part 1. First it is required to complete the second column of the table by specifying the expression needed to compute the power. This expression should be in terms of the signal amplitude A, as discussed in class. Second, write a Matlab code where the constant A is initialized, and then each of the respective power expressions are evaluated. The generated values should populate the last column of the given table. Use the Matlab command fprintf() to output the computed power values. For this part, assume A = 0.1 volt, and fo = 2 Hz. Name the Matlab code for this part "Code_Part_4.m". No (Math Signal expression) (Value in Power (Math Expression - in Power terms of signal amplitude A) Watts) 1 (a) s(t) = A x sin(2xfot) 2 (b) sz(t) = sin(21(3).t) 3 s_e(n = 3) = (41/(sin(2nfwt) + sin(27(3)fet) COE-241 ProgAssign#l-marking scheme Feb 11, 2020 - Page 5 of 6 4 (a) s_e(n = 5) = (4A/) (sin(2x/qt) + sin(27(3)1)+sin(29(5)ft)) 5 (b) s_e(n = 7) = (4A/x) (sin(2xf,t) + sin(27(3),t) + sin(27(5),t) + sin(28(700) 6 (c) s(t) = A x square(2xft) {5 points for every row of power calculation - Calculations are to be done in Matlab and echoed to screen, preferably, using fprintf() function) This part uses Matlab as a calculator. One can use fprintf() to print the calculated quantities to the screen. Do NOT hardcode the power values. All calculations should be in terms of the amplitude A. The code will generate the last column of the above table. Example: A = 4/pi; % solving for signal 5 - assuming A = 1 P = A^2/2*(1+1/9+1/25+1/49); % power for each frequency component of signal 5 fprintf("Power = %7.4f Watts ', P); Part 4 (30 points): It is required to use Matlab to compute the total power for each of the signals specified in the table given in Part 1. First it is required to complete the second column of the table by specifying the expression needed to compute the power. This expression should be in terms of the signal amplitude A, as discussed in class. Second, write a Matlab code where the constant A is initialized, and then each of the respective power expressions are evaluated. The generated values should populate the last column of the given table. Use the Matlab command fprintf() to output the computed power values. For this part, assume A = 0.1 volt, and fo = 2 Hz. Name the Matlab code for this part "Code_Part_4.m". No (Math Signal expression) (Value in Power (Math Expression - in Power terms of signal amplitude A) Watts) 1 (a) s(t) = A x sin(2xfot) 2 (b) sz(t) = sin(21(3).t) 3 s_e(n = 3) = (41/(sin(2nfwt) + sin(27(3)fet) COE-241 ProgAssign#l-marking scheme Feb 11, 2020 - Page 5 of 6 4 (a) s_e(n = 5) = (4A/) (sin(2x/qt) + sin(27(3)1)+sin(29(5)ft)) 5 (b) s_e(n = 7) = (4A/x) (sin(2xf,t) + sin(27(3),t) + sin(27(5),t) + sin(28(700) 6 (c) s(t) = A x square(2xft) {5 points for every row of power calculation - Calculations are to be done in Matlab and echoed to screen, preferably, using fprintf() function) This part uses Matlab as a calculator. One can use fprintf() to print the calculated quantities to the screen. Do NOT hardcode the power values. All calculations should be in terms of the amplitude A. The code will generate the last column of the above table. Example: A = 4/pi; % solving for signal 5 - assuming A = 1 P = A^2/2*(1+1/9+1/25+1/49); % power for each frequency component of signal 5 fprintf("Power = %7.4f Watts ', P)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started