Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Assignment (a) Write a Python or Matlab function x=forback (L,U,b), which solves, for given lower triangular matrix LE Rnxand upper triangular matrix R E
Programming Assignment (a) Write a Python or Matlab function x=forback (L,U,b), which solves, for given lower triangular matrix LE Rnxand upper triangular matrix R E Rn,the system of linear equations LU ab using forward substitution and backward substitution. Test the program with 21 6 18 0 0 -2 231 The solution of LUx-b is then r-11 2 31T. (b) Write your own function [L,u]-mylu (A) in Python or Matlab which computes the LU-decomposition of A ERX" (without pivoting). Do not use Python commands such as numpy.linalg. solve (A,b) or Matlab comands such as A-1 b, inv(A)b, Ab to solve the system of linear equations You can test your program with the matrices from question (a), i.e. set A LU. The function should take the matrix A as input argument and give back the matrices L. U as output arguments (c) Create a matrix A a and a block matrix B-biyl, s.t a11 13 15 17 41 043 a45 47 a71 a73 a75 a77 1.9 d c* c A-y und B- 1 2 3 with r (0.2 0.4 0.5 0.6 0.7 0.8 0.9)',y- (3 46 8 10 12 14 16), (d) Write a program, in Python or Matlab, to create the following plot including axis, labels, and title Python hint: Check out the Subplots, azes, and figures example at matplotlib.org/gallery.html Matlab hint: Use the commands subplot and hold on yn$an(5x) und .cos(5X) -2 0.2 0.3 0.4 0.5 0.8 0.9 y-sinjexp(x) 0.5 0.5 1.5 -3 -2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started