Pivots (Gaussian reduction)
06-05-2015, 07:03 PM
Post: #3
 DrD Senior Member Posts: 1,133 Joined: Feb 2014
RE: Pivots (Gaussian elimination)
(06-05-2015 05:06 PM)salvomic Wrote:  M1(1):= M1(1)./L1(j); // M3, M4, M6

The examples (see at the end of the program are):
M2: [[2,1,1], [4,-6,0], [-2,7,2]] with pivots: {2,-8,1} -> U [[2,1,1], [0,-8,2], [0,0,1]]
M3: [[1,1,1], [1,2,-2], [2,1,-3]] with pivots: {1,1,8} -> [[1,1,1], [0,1,-3], [0,0,-8]]
M4: [[0,3,-1], [1,1,2], [1,4,1]] with pivots: {1,3,0} -> [[1,1,2], [0,3,-1], [0,0,0]] (this one will swap two times; try also another version: [[1,1,2], [0,3,-1], [1,4,1]]: swap two times, with inverted pivots: without the function for swap in the program it'll give "error: invalid input"...)
M6: [[2,-1,0], [-1,2,-1], [0,-1,2]] with pivots: {2, 3/2, 4/3} -> U [[2, -1, 0], [0, 3/3, -1], [0,0, 4/3]]
M7: [[1,2,3], [2,4,3], [3,2,-1]] with pivots: {1, -4, -3} -> [[1,2,3], [0,-4,-10], [0, 0, -3]]

And now the problem of the "non general" formula (please, let me understand where I'm wrong):
Code:
   // M1:= M1./L1(j); // M2, M3, M4 (also IF (j<r))   M1(1):= M1(1)./L1(j); // M3, M4, M6   // IF (j>1) THEN M1:= M1./L1(j-1); END; // M3, M4, M7   // without div  M3, M4, M7
M2 needs division for current pivot in every lines, M6 only in the first, the others don't need division (apparently)...

But I'm searching for *one* formula, not more ;-)

Thank you for your patience and effort!
Salvo

In another post Han said to "put spaces around the ./ operator."
 « Next Oldest | Next Newest »

 Messages In This Thread Pivots (Gaussian reduction) - salvomic - 06-03-2015, 01:20 PM RE: Pivots (Gaussian elimination) - salvomic - 06-05-2015, 05:06 PM RE: Pivots (Gaussian elimination) - DrD - 06-05-2015 07:03 PM RE: Pivots (Gaussian elimination) - salvomic - 06-05-2015, 07:29 PM RE: Pivots (Gaussian reduction) - salvomic - 06-06-2015, 09:41 PM RE: Pivots (Gaussian reduction) - DrD - 06-07-2015, 10:42 AM RE: Pivots (Gaussian reduction) - salvomic - 06-07-2015, 11:28 AM RE: Pivots (Gaussian reduction) - DrD - 06-07-2015, 12:13 PM RE: Pivots (Gaussian reduction) - salvomic - 06-07-2015, 12:41 PM RE: Pivots (Gaussian reduction) - salvomic - 06-08-2015, 04:02 PM RE: Pivots (Gaussian reduction) - salvomic - 06-08-2015, 10:15 PM RE: Pivots (Gaussian reduction) - DrD - 06-09-2015, 10:55 AM RE: Pivots (Gaussian reduction) - salvomic - 06-09-2015, 12:50 PM RE: Pivots (Gaussian reduction) - salvomic - 06-13-2015, 02:56 PM

User(s) browsing this thread: 1 Guest(s)