Create an account on the HP Community to personalize your profile and ask a question
10-05-2017 09:00 AM
I accidentally put 1-D array to lu() function as below.
[1 2 3]->a
This crashed the calculator and reboots it again.
When I did the same thing with different calculators, they still showed the answers with crashing.
Solved! Go to Solution.
10-06-2017 11:28 AM
Another wish for Hp prime lu() improvement is to use the standard algorithm.
It seems that the result of Hp prime lu() is different from those of Matlab and Maxima
while the results from Matlab and Maxima are identical.
a:=[[-2 1 0 0 0]
[1 -2 1 0 0]
[0 1 -2 1 0]
[0 0 1 -2 1]
[0 0 0 1 -2]];
...> So I have writen a hp ppl program as shown below that generates the same answer as Maxima. I wish lu() in hp prime does the same thing as Matlab and Maxima.
IF DIM(d)==1 THEN
FOR r FROM 1 TO m-1 DO
WHILE a==0 AND c=n DO
FOR i FROM r TO m DO
IF u(i,c)?0 THEN
IF a==0 THEN
IF c=n THEN
WHILE u(i,c)==0 AND i=m DO
IF i>r THEN
FOR j FROM 1 TO k-1 DO
FOR i FROM r+1 TO m DO
10-06-2017 04:25 PM
Prime uses 2 different algorithms.
In Home view it uses LU, which is different from lu in CAS.
CAS can also use LU, just type the command in uppercase.
Besides, the displayal of the result in CAS when using lu is not very clear.
I did some testing and it seems that both methods satisfy the conditions for a LU decomposition.
In both cases all diagonal elements of L are 1.
10-07-2017 04:18 AM
Indeed. LU() works like the algorithm of the program LUP that I wrote.
So exact(LU(a)) in CAS mode was equivalent to my program.
I agree that lu() satisfies LU decomposition, but I am using this calculator to self-study a linear algebra textbook where it uses LU instead of lu for Gauss elimination.