Post Reply 
LDLt decomposition?
06-01-2015, 10:51 PM
Post: #3
RE: LDLt decomposition?
...to get Pivots I start with this code:

Code:

EXPORT gaussJordan(m)
// Gauss-Jordan elimination and pivots
// Salvo Micciché 2015
BEGIN
local temp, temp2, gj, r, c, j, piv;
r:=rowDim(m);
c:=colDim(m);
temp:=MAKEMAT(0,r,c);
gj:=MAKEMAT(0,r,c);
piv:=MAKELIST(0,X,1,r);
gj(1):= m(1);
piv(1):=gj(1,1);
    temp:= pivot(m,1,1);
FOR j FROM 2 TO r DO
    temp:=delrows(temp,1);
    temp:=delcols(temp,1);
    temp:=temp/piv(j-1);
    temp:= pivot(temp,1,1);
    piv(j):=temp(1,1);
    gj(j):= temp(1);
END; // for
RETURN {gj, piv};
END;

but I get wrong results (see image): I should get 0 below pivots at left, not ...at right; I'm trying SWAPROW() but it doesn't run...
Any help?


Attached File(s) Thumbnail(s)
   

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
LDLt decomposition? - salvomic - 01-26-2015, 12:30 PM
RE: LDLt decomposition? - salvomic - 06-01-2015, 05:54 PM
RE: LDLt decomposition? - salvomic - 06-01-2015 10:51 PM
RE: LDLt decomposition? - DrD - 06-02-2015, 11:26 AM
RE: LDLt decomposition? - salvomic - 06-02-2015, 12:10 PM
RE: LDLt decomposition? - salvomic - 06-02-2015, 05:54 PM
RE: LDLt decomposition? - DrD - 06-02-2015, 10:05 PM
RE: LDLt decomposition? - salvomic - 06-02-2015, 10:15 PM
RE: LDLt decomposition? - Helge Gabert - 06-02-2015, 11:05 PM
RE: LDLt decomposition? - DrD - 06-03-2015, 11:59 AM
RE: LDLt decomposition? - salvomic - 06-03-2015, 12:19 PM
RE: LDLt decomposition? - salvomic - 06-03-2015, 01:22 PM



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