Matlab assignment, MATLAB in Engineering

1. Write a MATLAB function (upperTriangle) using the functions you previously created to convert a matrix to upper triangular form. Start with row 1, column1. Find the row that has the largest absolute value in the current column (you have a function that will do that). If the row is not your working row, swap rows (you have a function that will do that). Calculate a factor that 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 that 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 process. Continue the process moving down the diagonal until you reach the last row. You matrix should be in upper triangular form.

Your function should be written to handle matrices of any size. Test your function with matrices of different sizes for which you know the solution to ensure that your function works correctly.

Use variable names that relate to their function and include comments that explain your program logic.

Do not use any built-in MATLAB functions except size(), input(), and zeros().


2. Modify the function in problem 1 (call the new function determ) to calculate the determinant of a square matrix. Recall that the determinant of an upper triangular matrix is the product of the diagonal elements. However, when creating an upper triangular matrix, each time a row is swapped, the determinant changes sign.
Posted Date: 11/23/2012 5:46:08 PM | Location : United States







Related Discussions:- Matlab assignment, Assignment Help, Ask Question on Matlab assignment, Get Answer, Expert's Help, Matlab assignment Discussions

Write discussion on Matlab assignment
Your posts are moderated
Related Questions
Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing

Illustration sorting vectors of structures: This function sorts the structures depend only on the price field. A more common function is shown next, that receives a string whi

Illustration of Graphics properties: A particular property can also be exhibited, for illustration, to view the line width:     >> get(hl,'LineWidth')     ans =

Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

Polyhedron - graphics objects: The field polyhedron.vertices is a matrix in which each row presents (x,y,z) points. The field polyhedron.faces defines the faces: for illustrat

Matrix Multiplication: The Matrix multiplication does not mean multiplying term by term; and it is not an array operation. The Matrix multiplication has a very particular mean

Example Exit modular program: In the illustration below, the user  Chose the Limit; -   Whenever prompted for n, entered the two invalid values before finally ente

I have a vector of X, one for Y , one for x-direction velocity U and one for y-direction velocity V. they are at same size. How can I plot streamline of that flow? I follow all exa

Gauss Elimination: The Gauss elimination technique consists of:    Generating the augmented matrix [A b]    Applying EROs to augmented matrix to obtain an upper trian

Example of Menu driven modular program: As an illustration of such a menu-driven program, we will write a program to discover the constant e. The constant e, known as the n