### matlab

#### Modifying lutx function in matlab

This is my first question. I am just looking for someone to point me in the right direction. The matrix factorization LU = PA can be used to compute the determinant of A. We have det(L)det(U) = det(P)det(A). Because L is triangular with ones on the diagonal, det(L) = 1. Because U is triangular, det(U) = u 11 u 22 · · · u nn . Because P is a permutation, det(P) = +1 if the number of interchanges is even and −1 if it is odd. So det(A) = ±u 11 u 22 · · · u nn . Modify the lutx function so that it returns four outputs. function [L,U,p,sig] = lutx(A) %LU Triangular factorization % [L,U,p,sig] = lutx(A) computes a unit lower triangular % matrix L, an upper triangular matrix U, a permutation % vector p, and a scalar sig, so that L*U = A(p,:) and % sig = +1 or -1 if p is an even or odd permutation. Write a function mydet(A) that uses your modified lutx to compute the determinant of A. In Matlab, the product u 11 u 22 · · · u nn can be computed by the expression prod(diag(U)). I am having trouble getting the function to display all four outputs. I do not understand why the function does not do it automatically. If someone could point me in the right direction, that would be greatly appreciated.

### Related Links

Solving ODEs in MATLAB using the Runga - Kutta Method

How to find the area of only garbage collected in sea using SIFT algorithm in matlab?

rsync: How to NOT apply wildcard excludes recursively

Change window size of a plot in MatLab [duplicate]

Using Multiple Matlab GUIDE Sliders to Adjust Curve Parameters

Are symbolic indexing possible in matlab?

Cannot use dlmread to read the whole tab-delimited file

FFT in Octave/Matlab, Plot cos(x) and approximate with

Distance between broken line and experimental values

multiple plots in a graph in matlab

Get first row of a ascii file (headline) matlab

how to develop LeGall 5/3 filter for reversible watermarking?

matlab: not enough input arguments error

MATLAB - Generate Random Vectors

How to save aspect ratio of matrix while exporting it to jpg

Get sub-clusters from a large cluster