HP Forums
Function Programing HOME and CAS Views - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Function Programing HOME and CAS Views (/thread-9861.html)



Function Programing HOME and CAS Views - lschroeder1947 - 01-05-2018 07:42 PM

HP Prime pivmat CAS var programming for FREE / Lite / Pro (Virtual, handheld) pivot CAS function - SCALE HOME function

See Post's alternate approach pivmat and pivmat screenshots.
Note A: To Works on Windows 10 Free, Android Free, iOS Lite in command line paste we needed to drop #cas and #end. Dropped #cas and #end works on Pro as well but not shown in Program Catalog. For Pro (Virtual, handheld) probably should use Program Editor with #cas and #end.
Note B: To work on Windows 10 Pro's needed BEGIN, return, and End.
Note C: 1, 2, and 3 work in both HOME and CAS view. Why 2 in CAS view and 3 in both HOME and CAS views?
Note D: From Han's post, Why no quotes?

1. Works HOME and CAS Views - wrapper pivot and mRow - expect HOME and CAS to work

pivmat(m,r,c):=
BEGIN
return CAS(pivot(CAS(mRow(1/m(r,c),m,r)),r,c));
END;

2. Works HOME and CAS Views - wrapper piivot - expect only HOME to work

pivmat(m,r,c):=
BEGIN
return CAS(pivot(SCALE(m,(1/m(r,c)),r),r,c));
END;

3. Works HOME and CAS Views- expect neither to work

pivmat(m,r,c):=
BEGIN
return pivot(SCALE(m,(1/m(r,c)),r),r,c);
END;


RE: Function Programing HOME and CAS Views - lschroeder1947 - 01-22-2018 08:44 PM

(01-05-2018 07:42 PM)lschroeder1947 Wrote:  ... Works HOME and CAS Views- expect neither to work

pivmat(m,r,c):=
BEGIN
return pivot(SCALE(m,(1/m(r,c)),r),r,c);
END;

Possible answer. See Post 4 and 5 matrix screenshots made from Jose Luis Tabara Carbajo Xcas YouTube videos.

Matrix commands / functions from Prime's Math menu are displayed as lowercase in Command Edit line, Uppercase in Prime's History area but are displayed as lowercase in Carbajo's YouTube video. SCALE function was found in the Catg menu and displayed as uppercase everywhere. The pivot command is an exception, being found in Prime's Math menu but display in History as lowercase. My conclusion is that Math Menu Matrix commands plus Uppercase Matrix Catg commands can be used in either HOME or CAS view without qualifying. Anybody know if this is true?