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

Matlab mexFunction(): when and how many times is it called?
MATLAB symbolic output with element-wise operations
Matlab plots with a very low resolution when using -nodesktop option
Sampling random numbers from normal distribution with given probability (Matlab)
In Adjacency matrix I want replace with its values which is given the other matrix
Remove unnecessary histogram peaks from a histogram.
Matlab “addpath” doesn't work for .exe?
substituting symbolic array
Fitting an ellipse to a logical matrix
Evaluate solution from Laplace
Meaning of the code in matlab [closed]
band pass filter matlab
GUI scrollbar error
accesing each index of matrix without indexing or using for/while loop
Calculating Variance of Monte Carlo Estimate
Joining discontinuous skeleton shapes and discontinuous lines

Categories

HOME
regex
apache-spark
graph
asp.net-identity
dom
office-js
tcl
typeahead.js
box
spi
angular-mdl
ibm-midrange
http2
wso2ei
scale
pyfftw
raspberry-pi2
jquery-selectors
pwm
mouseevent
php-carbon
centos6
desire2learn
desktop-app-converter
background-process
spring-saml
mindstorms
h5py
nomenclature
compass-lucene
linear
powerpc
kendo-chart
zuul
masm32
autogen
findall
turbo-c
sizing
ispconfig
redux-framework
xpdf
namenode
enhanced-ecommerce
benerator
intrinsics
occam-pi
multer
greenfoot
wchar-t
linq2db
folder-structure
json4s
monkeyrunner
hypervisor
cbc-mode
structured-programming
scalariform
getuikit
simpleadapter
mklink
gdk
knockout-mvc
directcompute
team-explorer-everywhere
fig
keyboard-navigation
data-quality
asp.net-apicontroller
angularjs-google-maps
acts-as-taggable-on
appstore-sandbox
mod-python
str-to-date
broadcom
polarssl
sugar.js
mainwindow
neventstore
shebang
vote
google-website-optimizer
arden-syntax
ekeventkit
jetspeed2
boost-gil
replay
codi
nstreecontroller
pastebin
myisam
unitils
webshop
ants

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