Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pls do all parts thx. 1 function (L,U- LUDecomp (A) dim-size(): n = dp (1) 2- 3 - 4 5 115 - 16 17 Identity

Pls do all parts thx.

image text in transcribed

1 function (L,U- LUDecomp (A) dim-size(): n = dp (1) 2- 3 - 4 5 115 - 16 17 Identity matrix to keep the score" I = eye (nl) 7 8 Reduce A to row echelon form 9- for 1 - 1:n-1 The column 10- for 1-A The row 11- alpha B The magenta numbers in video. 12- Ali, :) A (1, - alpha A (), :): Do the row operation to A. 13 - I() = Skeep track of the row operation. 14- end end 1- Define the reduced A as U and I as L. 18 U - A; L-I: Write out this code and use the function to answer the following questions. Important: you should only submit information that is asked of you in the question. Do not submit your MATLAB files or copies thereof. (a) What are the three missing rows A, B and C? Write them in your submission and also include them in your completed code to help you answer the proceeding questions (but do not submit your full code, it is enough to submit only the missing parts A, B and C). (b) Use the function to find the LU decomposition of a 6 x 6 matrix containing just l's and O's where I's are on the leading diagonal as well as the first and third diagonals to the right as well as the third and fourth diagonals to the left (note if you have entered the correct matrix and part (a) is correct your LU decomposition should contain only integers). To be clear, A - 6x6 1 1 1 @ 1 @ @ 1 1 1 @ 1 1 1 1 1 1 1 0 0 1 11 1 1 In your answer, just tell us what your output Land U are, no other working is needed. (C) Using pen and paper (showing working) and your computed LU decomposition from part (b), use forward and back substitution to find the solution vector x to Ax = b, where b = (1.0, 0, 0, 0, 0]", in terms of the arbitrary scalars u and u. (d) Now use your code and attempt to find the LU decomposition of the 6 x 6 matrix formed by writing numbers 1 to 6 on the first row, 7 to 12 on the second row, and so on. A = 4 5 11 1 7 13 19 25 31 2 a 14 20 3 9 15 21 27 33 10 16 22 28 34 17 23 29 35 6 12 18 24 30 36 26 32 Investigate the response of MATLAB to this input. Briefly explain in words what is going on here and why the function fails. It may be useful to know that "NaN' in MATLAB means "Not a Number' and often arises when you are attempting to divide a number by zero. 1 function (L,U- LUDecomp (A) dim-size(): n = dp (1) 2- 3 - 4 5 115 - 16 17 Identity matrix to keep the score" I = eye (nl) 7 8 Reduce A to row echelon form 9- for 1 - 1:n-1 The column 10- for 1-A The row 11- alpha B The magenta numbers in video. 12- Ali, :) A (1, - alpha A (), :): Do the row operation to A. 13 - I() = Skeep track of the row operation. 14- end end 1- Define the reduced A as U and I as L. 18 U - A; L-I: Write out this code and use the function to answer the following questions. Important: you should only submit information that is asked of you in the question. Do not submit your MATLAB files or copies thereof. (a) What are the three missing rows A, B and C? Write them in your submission and also include them in your completed code to help you answer the proceeding questions (but do not submit your full code, it is enough to submit only the missing parts A, B and C). (b) Use the function to find the LU decomposition of a 6 x 6 matrix containing just l's and O's where I's are on the leading diagonal as well as the first and third diagonals to the right as well as the third and fourth diagonals to the left (note if you have entered the correct matrix and part (a) is correct your LU decomposition should contain only integers). To be clear, A - 6x6 1 1 1 @ 1 @ @ 1 1 1 @ 1 1 1 1 1 1 1 0 0 1 11 1 1 In your answer, just tell us what your output Land U are, no other working is needed. (C) Using pen and paper (showing working) and your computed LU decomposition from part (b), use forward and back substitution to find the solution vector x to Ax = b, where b = (1.0, 0, 0, 0, 0]", in terms of the arbitrary scalars u and u. (d) Now use your code and attempt to find the LU decomposition of the 6 x 6 matrix formed by writing numbers 1 to 6 on the first row, 7 to 12 on the second row, and so on. A = 4 5 11 1 7 13 19 25 31 2 a 14 20 3 9 15 21 27 33 10 16 22 28 34 17 23 29 35 6 12 18 24 30 36 26 32 Investigate the response of MATLAB to this input. Briefly explain in words what is going on here and why the function fails. It may be useful to know that "NaN' in MATLAB means "Not a Number' and often arises when you are attempting to divide a number by zero

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

COMMENT INVESTIR ABC DE LA FINANCE

Authors: OLIVIER CHAZOULE

1st Edition

2020367521, 978-2020367523

More Books

Students also viewed these Finance questions

Question

How is a cash budget used to help manage current assets?

Answered: 1 week ago