Question

In: Computer Science

MATLAB QUESTION HOW TO FOLLOW TO EACH STEPS PLEASE GIVE TO EXPLAIN EACH SECTION THANKS! %...

MATLAB QUESTION

HOW TO FOLLOW TO EACH STEPS PLEASE GIVE TO EXPLAIN EACH SECTION THANKS!

% Section 1

clear variables;
close all;
clc;

% Use the "Run Section" button as you complete this script

% Given the matrix A and the vector B

A = [ 1 -4 2
-2 3 3
5 2 1];

b = [ -2
3
5];

% Calculate the product of A x B in the space below (grade = 10 points)


% Calculate the product of inverse(A) x B in the space below (10 points)


% Calculate c = the numeric value in the second row and
% first column of matrix [A] in the space below (10 points)

%% Section 2

clear variables;
close all;
clc;

% Create a variable x = range of 10 numbers
% between -pi and pi (radians) (grade = 10 points)

% Set y = sin(x) in the space below (10 points)


% Set z = x * sin(x) in the space below (10 points)
% HINT: You will need the .* for this operation instead of *

% Plot y and z versus x between the "hold on" and "hold off" commands
% Label the x and y axes properly and use appropriate units (10 points)
% use xlabel('Angle (Radians)')
% use ylabel('sin(x) and x sin(x)')
% Plot y using a blue line with circular markers (10 points)
% On the same plot, include z using a red line with triangular margers
% (1 point)
% use legend('sin(x)','x sin(x)') (10 points)
hold on

hold off


% After completing your script, click the "PUBLISH" tab
% Click the button in the "PUBLISH" tab, which is labeled Publish  

Solutions

Expert Solution

SECTION 1

% Given the matrix A and the vector B

A = [ 1 -4 2
-2 3 3
5 2 1];

B = [ -2
3
5];

% Calculate the product of A x B in the space below (grade = 10 points)
A * B

% Calculate the product of inverse(A) x B in the space below (10 points)
inverse(A) * B

% Calculate c = the numeric value in the second row and
% first column of matrix [A] in the space below (10 points)
c = A(2, 1)

SECTION 2

% Create a variable x = range of 10 numbers
% between -pi and pi (radians) (grade = 10 points)
x = linspace(-pi, pi, 10);

% Set y = sin(x) in the space below (10 points)
y = sin(x);

% Set z = x * sin(x) in the space below (10 points)
% HINT: You will need the .* for this operation instead of *
z = x.*sin(x);

% Plot y and z versus x between the "hold on" and "hold off" commands
% Label the x and y axes properly and use appropriate units (10 points)
% use xlabel('Angle (Radians)')
% use ylabel('sin(x) and x sin(x)')
% Plot y using a blue line with circular markers (10 points)
% On the same plot, include z using a red line with triangular margers
% (1 point)
% use legend('sin(x)','x sin(x)') (10 points)
hold on
plot(y, x, 'b--o', z, x, 'r--^');
xlabel('Angle (Radians)')
ylabel('sin(x) and x sin(x)')
print -dpng graph.png;
hold off

% After completing your script, click the "PUBLISH" tab
% Click the button in the "PUBLISH" tab, which is labeled Publish


Related Solutions

PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP...
PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP YOUR WHOLE EXPLANATIONS. PLEASE WRITE THE STEPS ON SOLVING THIS EXAMPLE EX) STEP 1, STEP 2, ETC HANDWRITING IS OKAY AS LONG AS IT IS READABLE. IF YOU HAVE USED THE EQUATIONS OR CONCEPTS, PLEASE STATE IT CLEARLY WHICH ONE YOU HAVE YOU USED SO I COULD FULLY UNDERSTAND THE DETAILS OF THE STEPS YOU HAVE DONE. PLEASE DO NOT OMIT THE DETAILS OF...
A discussion question is as follow: please provide a response: thanks for giving a clear picture...
A discussion question is as follow: please provide a response: thanks for giving a clear picture on GDP figures. I was hoping you will add figures for US GDP in the second quarter of 2020 to ascertain the impact of Covid-19 on the US economy and the world overall. The US real GDP has shrunk 31.4% in the second of 2020 and yet to release the third quarter figures. This is comparable to five years of economic growth wiped out...
Please do not just give the answer. Please also explain how you got them. Thanks! 1....
Please do not just give the answer. Please also explain how you got them. Thanks! 1. Which of the following is not a valid method of applying LCNRV: A. logical categories of inventory (i.e. product line) B. the entire inventory C. inventory items to be sold within the next year D. individual inventory items E. None of the answer choices are correct 2. Which of the following would not require the company to account for the change retrospectively? A. From...
Hi all, Can someone please answer this question. Please, list all steps! thanks! Machines A and...
Hi all, Can someone please answer this question. Please, list all steps! thanks! Machines A and B are mutually exclusive and are expected to produce the following real cash flows:       Cash Flows ($ thousands) Machine C0 C1 C2 C3 A –102 +112 +123 B –122 +112 +123 +135       The real opportunity cost of capital is 12%.    a. Calculate the NPV of each machine. (Do not round intermediate calculations. Enter your answers in dollars not in thousands, e.g....
AP CHEM question! Can you please follow these steps for each: 1.) net ionic equation, 2.)...
AP CHEM question! Can you please follow these steps for each: 1.) net ionic equation, 2.) ice table, 3.) pH= pKa + log (CB/WA) A 35.0 mL sample of 0.150 M acetic acid (HC2H3O2) is titrated with 0.150 M NaOH solution. Calculate the pH after the following volumes of base have been added: A.) 0 mL B.) 17.5 mL C.) 34.5 mL D.) 35.0 mL E.) 35.5 mL F.) 50.0 mL
Hi all, Can someone please answer this question. Please list steps! Thanks! You have the chance...
Hi all, Can someone please answer this question. Please list steps! Thanks! You have the chance to participate in a project that produces the following cash flows: Cash Flows ($) C0 C1 C2 3,900 5,100 –10,900 a. The internal rate of return is 14.13%. If the opportunity cost of capital is 14%, what is the NPV of the project? (A negative answer should be indicated by a minus sign. Do not round intermediate calculations. Round your answer to 2 decimal...
Hi all, Can someone please answer this question. Please list all steps! Thanks! Consider the following...
Hi all, Can someone please answer this question. Please list all steps! Thanks! Consider the following projects: Cash Flows ($) Project C0 C1 D –10,300 20,600 E –20,300 35,525 Assume that the projects are mutually exclusive and that the opportunity cost of capital is 9%. a. Calculate the profitability index for each project. (Do not round intermediate calculations. Round your answers to 2 decimal places.) Project Profitability Index D E b-1. Calculate the profitability-index using the incremental cash flows. (Do...
Hi all, Can someone please answer this question. Please list steps! Thanks! Consider the following cash...
Hi all, Can someone please answer this question. Please list steps! Thanks! Consider the following cash flows: Cash Flows ($) C0 C1 C2 −8,450 6,200 21,400 a. Calculate the net present value of the above project for discount rates of 0, 50, and 100%. (Do not round intermediate calculations. Round your answers to the nearest whole dollar amount.) NPV @ 0% $ NPV @ 50% $ NPV @100% $ b. What is the IRR of the project? (Do not round...
For each question please give: a. a definition of the term; and b. discuss how the...
For each question please give: a. a definition of the term; and b. discuss how the concept assists us in understanding the changing nature of work and/or employment a) Bureaucratic control
For each question please give: a. a definition of the term; and b. discuss how the...
For each question please give: a. a definition of the term; and b. discuss how the concept assists us in understanding the changing nature of work and/or employment. Q1) Neo-liberalism Q2) The precariat Q3) Uberisation
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT