
×InformationFix Windows 10 Update Issues
Resolve Windows 10 related issues for your HP computers or printers by HP Windows 10 Support Center

×InformationFix Windows 10 Update Issues
Resolve Windows 10 related issues for your HP computers or printers by HP Windows 10 Support Center
 HP Community
 >
 Other Products
 >
 Calculators
 >
 [1 2 3]>a; lu(a); crashes the calculator and reboots it.
 Mark Topic as New
 Mark Topic as Read
 Float this Topic for Current User
 Bookmark
 Subscribe
 Mute
 Printer Friendly Page
Create an account on the HP Community to personalize your profile and ask a question
Solved!
[1 2 3]>a; lu(a); crashes the calculator and reboots it.
10052017 09:00 AM
I accidentally put 1D array to lu() function as below.
[1 2 3]>a
lu(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.
10052017 01:44 PM
Indeed! I've passed this on to the CAS author for fixing. Thank you!
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
10062017 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]];
lu(a)
...> 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.
#cas
LUP(x):=
BEGIN
LOCAL u,d,m,n,i,j;
LOCAL r,c,p,a,l,k,w;
d:=SIZE(x);
IF DIM(d)==1 THEN
m:=1;
n:=d;
ELSE
m:=d(1);
n:=d(2);
END;
u:=x;
l:=IDENMAT(m);
p:=IDENMAT(m);
c:=1;
k:=0;
FOR r FROM 1 TO m1 DO
a:=0;
WHILE a==0 AND c=n DO
FOR i FROM r TO m DO
IF u(i,c)?0 THEN
a:=1;
END;
END;
IF a==0 THEN
c:=c+1;
ELSE
k:=k+1;
END;
END;
IF c=n THEN
i:=r;
WHILE u(i,c)==0 AND i=m DO
i:=i+1;
END;
IF i>r THEN
SWAPROW(u,r,i);
SWAPROW(p,r,i);
FOR j FROM 1 TO k1 DO
a:=l(i,j);
l(i,j):=l(r,j);
l(r,j):=a;
END;
END;
FOR i FROM r+1 TO m DO
a:=u(i,c)/u(r,c);
l[i,k]:=a;
SCALEADD(u,a,r,i);
END;
END;
END;
return {p,l,expand(simplify(u))};
END;
10062017 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.
10072017 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 selfstudy a linear algebra textbook where it uses LU instead of lu for Gauss elimination.
Didn't find what you were looking for? Ask the community