Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve questions 4(a), 4(b), 4(c), and 4(d) in MATLAB. Thank you Question 4. Gaussian Elimination and Reduced Row-Echelon Form Now that you know how

Please solve questions 4(a), 4(b), 4(c), and 4(d) in MATLAB. Thank you

image text in transcribed

Question 4. Gaussian Elimination and Reduced Row-Echelon Form Now that you know how to do matrix calculations with MATLAB, you can easily carry out the steps in Gaussian elimination. Before starting work on this question, type rrefmovie at the MatLAB prompt. If you get an error message ??? Undefined function or variable rrefmovie, click on Set Path on the toolbar. Insert the name of the directory where you have copied the Tcode rrefmovie.m, and save the result (you will need to do this in future labs also). You will see a step-by-step example of the row operations that transform a matrix A into its reduced row echelon form R=rref(A). In this demonstration, each pivot is chosen to be the largest in its column (for numerical stability), so extra row interchanges are used. Since rref (A) is uniquely determined by A, this does not affect the final answer. (Do not include this part in your lab write-up.) (a) Generate a 34 matrix A with random integer entries by the command A=fix(10rand(3,4)) To transform A into R=rref(A), start with R=A. Normalize the first row of R to get R(1,1)=1 : R=A;R(1,:)=R(1,:)/R(1,1) (note the use of the colon to operate on whole rows of the matrix). If your random matrix happens to have A(1,1)=0, then interchange rows to get a nonzero entry in the (1,1) position before doing the calculation above. Now subtract a multiple of the first row of R from the second row to make R(2,1)=0 : R(2,:)=R(2,:)R(2,1)R(1,:) Repeat this procedure to make R(3,1)=0 : R(3,:)=R(3,:)R(3,1)R(1,:) (you can minimize typing by using the up-arrow key and editing the command line). The first column of your matrix R should now be the same as the first column of rref (A). (b) Operate on R by the same method as in (a) to obtain the second column of rref (A). First normalize row 2 of R, then subtract multiples of row 2 from rows 1 and 3 to put zeros in the (1,2) and (3,2) positions (you can minimize typing by using the up-arrow key and editing the commands used in part (a)). Be sure to refer to the entries in your matrix symbolically as was done in part (a); don't type explicit decimal numbers in the MatlaB commands. (c) Operate on R by the same method as in (b) to obtain the third column of rref (A). First normalize row 3 of R, then subtract multiples of row 3 from rows 1 and 2 to put zeros in the (1,3) and (2,3) positions. (d) Your matrix R should now be transformed into rref (A) (since A is a random 34 matrix, rref (A) is (almost) sure to have rank 3). Check your answer by MatLAB with the command rref (A). If the MatLAB answer is not the same as the current value of your R, go back and redo your calculations

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 1 Lnai 9851

Authors: Paolo Frasconi ,Niels Landwehr ,Giuseppe Manco ,Jilles Vreeken

1st Edition

3319461273, 978-3319461274

More Books

Students also viewed these Databases questions