1. (a) Write a MATLAB function x = bcksbst(U,b) that inputs a nonsingular upper
triangular matrix U, and a column vector b of the same dimension and output will be a
column vector x, which is the numerical solution of the linear system Ux = b obtained
from the back substitution algorithm.
(b) Use this function to solve the system Ux = b with
1 2 3 4
0 2 3 4
0 0 3 4
0 0 0 4
(c) How much cpu time it takes in part (b) ?
(d) Use U\b, MATLAB build-in function to solve (b), how much cpu time it takes?
2. By hand, not MATLAB, solve the following system without partial pivoting (no row
+ 6z2 + 9x3 = 39
3. Use MATLAB to generate a plot of size n of the Hilbert matrix H vs the quantity
5.10.15 100. You will use MATLAB function hilb(n)
to generate the Hilbert matrix of size n. What do you observe? Use appropriate scale
for plot. (Note: k = is called the condition number of the matrix A and
MATLAB has a built-in function cond(A, inf) to calculate this).
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
%Input: U Uppertriangular square matric
% b vector
%Output: x, solutions of Ux=b