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

Categories

HOME
sqlite
elf
apache-pig
react-navigation
windows-runtime
xamarin.forms-listview
angular-mdl
webdriver-io
lighttpd
lag
web-audio
plc
amplitude
gyroscope
google-finance
naturallyspeaking
parallax.js
buffer-overflow
concurrenthashmap
swipe
tensor
querydsl
hamcrest
nav
presto
macvim
confirm
rights-management
sagepay
linear
stateful
nexus-5
sweet.js
mobile-browser
zuul
dwr
jahia
gpt
sizing
coldfusion-11
codeigniter-upload
webclient-download
pager
angularjs-filter
viewengine
facebook-comments
airplay
js-of-ocaml
win32com
xelement
xsb
equinox
react-rails
declaration
epplus-4
java-client
gnat
razor-2
imaging
lwuit-list
subdirectory
image-scaling
pkcs#10
nine-patch
deepzoom
jqgrid-php
junit-runner
colormatrix
couchrest
libtorrent-rasterbar
location-client
sysadmin
external-dependencies
emitmapper
mips64
route-me
locomotivejs
timespan
applaud
51degrees
time-limiting
ekeventkit
springboard
plinqo
staging
program-transformation
dynamic-websites
contracts
ants
user-testing

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App