LDLt decomposition?

01262015, 12:30 PM
(This post was last modified: 02062015 10:42 PM by salvomic.)
Post: #1




LDLt decomposition?
hi all,
in HP Prime we have for a matrix LU decomposition (it give P, L, U so PA=LU) and Cholesky decomposition (for that A=LLt, Lt is TRAN(L))... I can't find a factorization LDLt where D is a diagonal of pivot. Is there a way to get it? a program or something? Thank you! Salvo 

06012015, 05:54 PM
Post: #2




RE: LDLt decomposition?
I wonder still for this question and another one, connected (in my case):
With pivot(Mat, n,m) we get pivot for n,m: what's a simple way to get every pivots (Gauss' reduction); I forgot it thanks! Salvo ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

06012015, 10:51 PM
Post: #3




RE: LDLt decomposition?
...to get Pivots I start with this code:
Code:
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? ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

06022015, 11:26 AM
Post: #4




RE: LDLt decomposition?
Is diag() useful for you?
Code:


06022015, 12:10 PM
(This post was last modified: 06022015 02:23 PM by salvomic.)
Post: #5




RE: LDLt decomposition?
(06022015 11:26 AM)DrD Wrote: Is diag() useful for you? hi Dale, diag() is also ok to get pivots, but after to have "pivotized" the original matrix: [[2,1,1,5],[4,6,0,2],[2,7,2,9]] My goal is to return a transformed matrix and a list with pivots (and also diag() could be ok). EDIT: Something like that, Dale: Code:
this runs, but with "singular" matrices it gives still division by 0 and in some cases fails (we need also swapping of some rows...), however now we have a base to calculate LDLt decomposition also... ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

06022015, 05:54 PM
(This post was last modified: 06022015 07:20 PM by salvomic.)
Post: #6




RE: LDLt decomposition?
SWAPROW runs well in command line but not in a program? or am I missing something?
This code doesn't swap row 2 with 3... Code: EXPORT gaussJordan(m) See the prints in Terminal (debug, hi) with this matrix [[1,2,3],[2,4,3],[3,2,1]] Normally it would give division by zero, so we must swap the row with its next... The result should be [[1,2,3],[0,4,10],[0,0,3]] with pivots d={1,4,3} I'm using an "old C style" tip, and it works: Code:
∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

06022015, 10:05 PM
Post: #7




RE: LDLt decomposition?
I tried both SWAPROW() and SWAPCOL() on a 3x3 matrix and neither worked from the command line or HOME program, for me.
Dale 

06022015, 10:15 PM
Post: #8




RE: LDLt decomposition?
(06022015 10:05 PM)DrD Wrote: I tried both SWAPROW() and SWAPCOL() on a 3x3 matrix and neither worked from the command line or HOME program, for me. Please, could I suspect a bug? Strange, however... Salvo ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

06022015, 11:05 PM
Post: #9




RE: LDLt decomposition?
How about CAS.SWAPCOL()? Works here.


06032015, 11:59 AM
Post: #10




RE: LDLt decomposition?
ALL similar matrix commands have the same requirement: ADDROW(), DELROW(), SWAPROW(), etc., all have the same CAS requirement in order to work on the HC and virtual calc. They seem to work ok on the Android app. I sent a bug report in, but, maybe this is intended behavior? If the command names were in lower case, it would serve as a hint that they need CAS handling.
Dale 

06032015, 12:19 PM
(This post was last modified: 06032015 02:51 PM by salvomic.)
Post: #11




RE: LDLt decomposition?
(06032015 11:59 AM)DrD Wrote: ALL similar matrix commands have the same requirement: ADDROW(), DELROW(), SWAPROW(), etc., all have the same CAS requirement in order to work on the HC and virtual calc. They seem to work ok on the Android app. I sent a bug report in, but, maybe this is intended behavior? If the command names were in lower case, it would serve as a hint that they need CAS handling. I agree. Here I've issues with them in CAS, however, so I think maybe there could be some bugs with the last FW upgrade... Salvo EDIT: here SWAPROW([[1,2,3],[0,0,3],[0,4,10]],2,3) doesn't work nor in CAS neither in Home. ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

06032015, 01:22 PM
(This post was last modified: 06052015 06:40 PM by salvomic.)
Post: #12




RE: LDLt decomposition?
however, please, see also this thread (for pivots calculation), that could help us to make an actual program to find Gauss elimination procedure, then pivots to use to find eventually LDLt decomposition.
Please, help EDIT: working in progress in this thread in the Forum! ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C  DM42 WP34s :: Prime Soft. Lib 

« Next Oldest  Next Newest »

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