3 Additional ways to extend the HP Prime Free - Lite
10-07-2017, 04:45 AM (This post was last modified: 01-25-2018 05:34 AM by lschroeder1947.)
Post: #1
 lschroeder1947 Member Posts: 63 Joined: Apr 2017
3 Additional ways to extend the HP Prime Free - Lite
We recommend using alternate approach below.

See this thread's Post 3 on using pivmat to solve dual simplex problem and Post 5 where we add CAS variables to do a function's partial derivative.

1. Use global variables with the Define statement - copy and paste
lineptm
M*('X'-L1(1))+L1(2)

2. Use global variables with the Define statement and merge two function's code- copy and paste
linept1pt2
((L2(2)-L1(2))/(L2(1)-L1(1)))*('X'-L1(1))+L1(2)
,
3. Use global variables with the Define statement and function compositions - copy and paste
pivmat
pivot(SCALE(M1,(1/M1(R,C)),R),R,C)

<Edit 1 - Dec 26, 2017>

Alternate Approach - using CAS variables with local paramenters pivmat here seems to be stable where above Define approach sometimes went corrupt (probably true that lineptm and linept1pt2 are more stable as well)
Copy each of these functions to the CAS command line and press enter (BEGIN, return, ENTER necessary for Windows Store version of Free - used for iOS Lite and Android Free as well):

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

lineptm(x1,y1,m):=
BEGIN
return (m*('X'-x1)+y1);
END;

linept1pt2(x1,y1,x2,y2):=
BEGIN
return ((y2-y1)/(x2-x1)*('X'-x1)+y1);
END;

</Edit 1>  Code originally for calculator, Pro, and Virtual software as programs CLSlines and pivmat shown below. Using these defined functions in the HP Prime Free along with CAS variables, the CAS and HOME view, and default Application Library Apps for courses such as Finite Math. The function pivmat would allow you to easily check your manual calculations for Simplex maximum and minimums; matrix inverses; and systems of equations where the linear function could be used for linear supply and demand; linear cost, revenue, and profit; linear depreciation and host of other linear applications. Note; for some reason pivmat only worked on CAS view with HP Prime Free iOS. We used fraction conversion key in various places. Notice the goofy representation of zero. Used matrix editor to add M1. « Next Oldest | Next Newest »

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