Program for upper triangle using matlab


Question: Write down a MATLAB function (upper Triangle) by using the functions you previously made to transform a matrix to upper triangular form. Begin with row 1, column1. Find out the row that has the largest absolute value in the current column (you have a function which will do that). If the row is not your working row, swap rows (you have a function which will do that). Compute a factor which you can use to form a linear combination with your working row to zero the value in the column below your working row. Use that factor and the linear combination of rows to zero the first column below your working row (you have a function which will do that). Continue down that column until you reach the last row. All the values in your working column below your working row should be zero. Move to the next diagonal position (down 1 row over 1 column) and repeat the procedure. Continue the process moving down the diagonal until you reach the last row. Your matrix must be in upper triangular form.

Your function must be written to handle matrices of any size. Test your function with matrices of different sizes for which you know the solution to make sure that your function works appropriately.

Use variable names which relate to their function and comprise comments which explain your program logic.

Don’t use any built-in MATLAB functions except size(), input(), and zeros().

Question: Modify the function in problem 1 (call the new function determ) to compute the determinant of a square matrix. Recall that the determinant of an upper triangular matrix is the product of diagonal elements. Though, when creating an upper triangular matrix, each time a row is swapped, the determinant changes sign.

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: Program for upper triangle using matlab
Reference No:- TGS0213

Expected delivery within 24 Hours