tryrowop - A = 1 2 4 3 7 1 2 6 8 b = 17 20 38 R = 1 2 4 17...

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

View Full Document Right Arrow Icon
>> dbtype tryrowop.m 1 A = [ 1 2 4 ; 3 7 1 ; 2 6 8 ] 2 b = [ 17 ; 20 ; 38 ] 3 4 R = [ A b ] 5 6 r1 = R(1,:) 7 r2 = R(2,:) 8 r3 = R(3,:) 9 10 M = diag(ones(1,3)) 11 12 M(2,1) = r2(1)/r1(1) 13 r2 = r2 - M(2,1)*r1 14 15 M(3,1) = r3(1)/r1(1) 16 r3 = r3 - M(3,1)*r1 17 18 M(3,2) = r3(2)/r2(2) 19 r3 = r3 - M(3,2)*r2 20 21 B = [ r1 ; r2 ; r3 ] 22 23 M*B 24 >> tryrowop
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A = 1 2 4 3 7 1 2 6 8 b = 17 20 38 R = 1 2 4 17 3 7 1 20 2 6 8 38 r1 = 1 2 4 17 r2 = 3 7 1 20 r3 = 2 6 8 38 M = 1 0 0 0 1 0 0 0 1 M = 1 0 0 3 1 0 0 0 1 r2 = 0 1 -11 -31 M = 1 0 0 3 1 0 2 0 1 r3 = 0 2 0 4 M = 1 0 0 3 1 0 2 2 1 r3 = 0 0 22 66 B = 1 2 4 17 0 1 -11 -31 0 0 22 66 ans = 1 2 4 17 3 7 1 20 2 6 8 38 >> Page 1 of 1 9/30/2004 tryrowop.doc...
View Full Document

This note was uploaded on 04/26/2010 for the course CEG 616 taught by Professor Taylor during the Winter '10 term at Wright State.

Ask a homework question - tutors are online