diary20050114

# diary20050114 - y = L P*b x = U y clc help lu clc help...

This preview shows page 1. Sign up to view the full content.

% Matlab diary from cs110a class #6, Jan 14 2005. % % This is what I typed in class. % % Type it into Matlab yourself to % reproduce the output I showed. A = [10 -7 0 ;-3 2 6 ; 5 -1 5] b = [7 ; 4 ;6] A \ b [L,U,P ] = lu(A) L * U P*A A b = [7 ; 4 ;6] x = A \ b [L,U,P] = lu(A) b P*b x = A \ b [L,U,P] = lu(A)
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y = L \ P*b x = U \ y clc help lu clc help lutx [L,U,p] = lutx(A) L*U - A(p,:) A(p,:) clc help lutx edit lutx A k=1 format compact [n,n] = size(A) i = k+1:n A(i,k) = A(i,k)/A(k,k) j= k+1:n A(i,k) A(k,j) A(i,k)*A(k,j) A(i,k)*A(k,j) A(i,j) = A(i,j) - A(i,k)*A(k,j)...
View Full Document

## This note was uploaded on 12/27/2011 for the course CMPSC 110a taught by Professor Gilbert during the Fall '09 term at UCSB.

Ask a homework question - tutors are online