The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP Prime - Saved formulas, expressions
Message #1 Posted by CR Haeger on 4 Oct 2013, 10:07 p.m.

Hello,

I am trying to find decent way(s) to save/define formulas or expressions in PRIME that I can use over and over, like

POLY(A,B,C,X)= A*X^2 + B*X + C

then use this in APPS Symb view, symbolic/numerical solvers, algebra operations etc...

Is this as simple as SHIFT DEFINE and naming, typing the formula/expression and checking/unchecking the proper variables?

Best, Carl

      
Re: HP Prime - Saved formulas, expressions
Message #2 Posted by Eddie W. Shore on 4 Oct 2013, 11:23 p.m.,
in response to message #1 by CR Haeger

Two things with Shift+Define:

1. The arguments come in the order where the variable is first seen. Plan your function carefully.

Using your example, if I use the Define feature to define POLY as X^2 * A + X * B + C

Then POLY uses the following arguments in this order: POLY(X, A, B, C)

2. Functions made with Define take numerical arguments only. The only exception I found was to use this in the Solver.

Using the POLY example:

In the Solver App set E1 as POLY(X,A,B,C) = R. (R is for the result, leave this out if you want to solve POLY(X,A,B,C)=0). You will be able to solve for only one of the variables at a time.

Hope this helps.

            
Re: HP Prime - Saved formulas, expressions
Message #3 Posted by CR Haeger on 6 Oct 2013, 6:04 p.m.,
in response to message #2 by Eddie W. Shore

Thank you for your explanation Eddie.

Unfortunately, it still feels like a minefield to me trying to save formulas/expressions on the PRIME and then trying to use (copy or call) in the APPS, Math or CAS menus. At best. I go to the APP, key in the expression get some results and it ends there. Trying to go elsewhere causes errors.

I think Paul Fox had a recent post asking for tutorials. I agree as the users guide seems okay to INTRODUCE all the functions/apps, but tutorials involving more than one APP, CAS or Math function would be helpful.

Ill try to teach myself more but its frustrating.

                  
Re: HP Prime - Saved formulas, expressions
Message #4 Posted by CR Haeger on 6 Oct 2013, 6:23 p.m.,
in response to message #3 by CR Haeger

Quote:

Ill try to teach myself more but its frustrating.


Two questions after spending time in the UG and the Emulator:

1. How can I delete or set variables back to zero? Just the PURGE() command? Any other ways?

2. Why does the x,t,theta,n key sometimes show an x, a or b when pressed? Should this be used ONLY for APPS?

Carl

                        
Re: HP Prime - Saved formulas, expressions
Message #5 Posted by Tim Wessman on 6 Oct 2013, 9:35 p.m.,
in response to message #4 by CR Haeger

1. To delete a variable created in home, select it in the vars menu and press BKSP. No programmatic way to do it. There is a purge, but that really only applies in the CAS.

2. That key depends on what application is active. Default is x, but if you are in sequence it will be n, or parametric t, polar theta and your first variable of the first equation in solve.

TW

Edited: 6 Oct 2013, 9:37 p.m.

                              
Re: HP Prime - Saved formulas, expressions
Message #6 Posted by CR Haeger on 7 Oct 2013, 8:32 p.m.,
in response to message #5 by Tim Wessman

Tim - thank you.

I'm starting to see now the different uses for User VARIABLES and User FUNCTIONS.

Question - it does seem easier typing in the FUNCTIONS via the Emulator. I assume there is no way to SEND these to my HHC directly to or via the Connectivity kit?

            
Re: HP Prime - Saved formulas, expressions
Message #7 Posted by CR Haeger on 7 Oct 2013, 8:25 p.m.,
in response to message #2 by Eddie W. Shore

Quote:
Using your example, if I use the Define feature to define POLY as X^2 * A + X * B + C

Then POLY uses the following arguments in this order: POLY(X, A, B, C)

2. Functions made with Define take numerical arguments only. The only exception I found was to use this in the Solver.


Eddie - Thank you!

Not only does this work in Solver APP, it seems that it also works in the Function APP (courtesy of Tim and others). Although you need to use two APPS, you get solver and graphing together. Cool.

Edited: 7 Oct 2013, 8:26 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall