Question: I am having trouble completing my study guide with the use of MATLAB, here are the questions. function questions Create a driver to answer all

I am having trouble completing my study guide with the use of MATLAB, here are the questions.

I am having trouble completing my study guide with the use of

MATLAB, here are the questions. function questions Create a driver to answer

all of the following questions and compute all of the following commands.

function questions Create a driver to answer all of the following questions and compute all of the following commands. Any questions that need to be answered with words should be answered using comments. Question 1 Create a vector of 2,531 equally spaced numbers between 1 and 3. Have your function return the whole vector. Only display the first #20 entries using disp() in your driver. Hint: use "linspace" & Question 2 & Run the code: a = 20:25; b = 13:3:20; 3+a); C[a; b); # i) Describe what the colon does in the above code. # ii) What do semicolons within the square brackets accomplish? # iii) Using the ones) command, assign the first row of the matrix a to a vector of all i's. Hint: Use a colon in a different way for iii) & Question 3 Let A be a 4 by 5 matrix defined in MATLAB. Write several lines of code that do the following: Xa) replace the entry in the second row, first column with the number 2. #b) eliminate the third row & c) add a new column (after the third row has been eliminated) to be the new last column of the matrix. Define the new column 8 so that is contains any odd integers you choose. Assume that you have run these lines of code. What are the dimensions # of the altered matrix? Is it possible to eliminate a single entry from this matrix (i.e., run a line similar to {\tt A(1,5) = [];})? & Question 4 #Let A = [1 4 7 2 8 3 6 10 95). Interpret the result of the command: A5 & Also, interpret the result of the command A/A>5). & Question 4 & Let A - 11 4 7 2 8 3 6 10 9 5). & Interpret the result of the command: A>5 Also, interpret the result of the command A(A>5). & Run both commands, save the outputs and return them in your function. Display them from your driver. & Question 5 8 What is the difference between the size command and the length command? Explain in words and show using MATLAB by two examples: a) creating a vector and running the commands, & b) creating a matrix and running the commands, Have your function return both the size and length outputs of your chosen vector. & Display them from your driver. Question 6 Let A - 1235; 4 3 2) and B - [5 3 2; 34 21. What happens when you run the command A*B? What are the respective sizes of A and B? Interpret the result and fix one or both of the matrices so the command works. What is the rule for multiplying matrices? Is matrix multiplication commutative, i.e. A B - BA? Why? & Have your function return the output of a corrected version of AEB. # Display it from your driver. # Question 7 Let A = [2 3 5; 4 3 2] and B - [2 3; 5 4; 3 2). What happens when you run the command A. *B? What are the respective sizes of A and B? Interpret the result and fix one or both of the matrices so the command works. How does dot multiplication differ from matrix multiplication? Have your function return the output of a corrected version of A.B. & Display it from your driver. Question 8 Let A = [2 3 5; 4 3 2]. What happens when you run the command A2? & Interpret the result and fix the command so Display it from your driver. Question 7 Let A = 12 3 5; 4 3 2] and B = 12 3; 5 4; 3 21. # What happens when you run the command A.*B? What are the respective sizes of A and B? Interpret the result and fix one or both of the matrices so the command works. How does dot multiplication differ from matrix multiplication? Have your function return the output of a corrected version of A.*B. # Display it from your driver. Question 8 Let A = 12 35; 4 3 2]. What happens when you run the command A 22 Interpret the result and fix the command so that it works, producing la matrix with the same dimensions as A. Explain how you did this. Have your function return the output of a corrected version of A 2. Display it from your driver. & Question 9 Let A - 13 4 1; 8 -2 4; -1 9 -2] and b - 135 11. What happens when you run the command Alb? Interpret the result and fix b so the command works. What does (backslash) do? What are the size requirements for the backslash? Have your function return the output of a corrected version of c=A\b. Display c from your driver. # Question 10 & What is the difference between the inverse of a matrix and the transpose of a matrix? Explain in words and show using MATLAB by creating a matrix and calculating both the inverse and the transpose # of that matrix. Have your function return the following: Your matrix, its inverse, and its transpose. Display them. Can you take the inverse of a non-square matrix? How about the transpose? 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 Databases Questions!