Answered step by step
Verified Expert Solution
Link Copied!

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..

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

2. Discuss various aspects of the training design process.

Answered: 1 week ago