cancel
Showing results for
Did you mean:
Highlighted
Honor Student
4 1 0 0
Message 1 of 4
1,691
Flag Post
HP Recommended

# HP prime programming Variables with subscripts or greek letters

HP Prime

Hi,

I would like to program some equations with greek letters or subscripts. some the the equations from my course have the same leter in the equation so it would also be helpful to have a sub script. for example Pa and Pb fr preassue a and pressure b. Is it possible to do this? Can this be done in the define equations menu and on programs uploaded to the calculator?

Tags (3)
3 REPLIES 3
PhD Student
708 700 110 163
Message 2 of 4
1,669
Flag Post
HP Recommended

## HP prime programming Variables with subscripts or greek letters

Yes, of course you can do this.

However, Prime in the apps and home screen needs to know that something is a variable BEFORE it encounters it in an equation. A-Z are already predefined as "number variables" and this why typing them just works for you.

I'd recommend you open the SOLVE app. Now, press the "Programs" key down on the 2 button. See the top item there? That is your program file for the solve app.

Press EDIT. At the top, go ahead and create some items as variables.

EXPORT Pa, Pb, α1, β;

Now what that just did is create 4 new variables with those names. These 4 variables will be active and visible when your Solve app is open. Note, your "EXPORT" line can only have 8 variables per line. See how I used subscripts and greek chars in there? Take a look in the "chars" menu on your Vars key shift function if you want to look for a wide range of characters to use.

Now press SYMB and you can type in something like Pa+α1= β₂ for your expression. It happily accepts it because it knows that "Pa" is a variable now.

Once you have up to 10 equations entered and things are looking good, go ahead and open the APP screen, and tap "Save". You can now save it as something like "My Saved Equations" or whatever name you want. The main solve app can be reset, or changed, and you still have your saved variables.

It really does go quick once you get the basics. If you want to use a custom app that lets you do all of this through a nice interface, or use existing equations, you could give this app a try: http://www.hpmuseum.org/forum/thread-7725.html

Feel free to ask questions if you have trouble.

TW

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.
Top Student
9 5 0 0
Message 3 of 4
852
Flag Post
HP Recommended

Thanks Tim!

Bob

Student
1 1 0 0
Message 4 of 4
406
Flag Post
HP Recommended

## HP prime programming Variables with subscripts or greek letters

Even though it is exactly correct (thank you, Tim!) , it took me some trial and error to correctly interpret the answer, so I thought a more complete example would be helpful to someone out there at some point in the future.

Make sure you put the semi-colon (;) after the added "EXPORT" line as shown below (and as shown in original post).

Here is what my modified "SOLVE" app looks like (I'm making the variables vf, vi, a, s, t available for formulas):

EXPORT vf, vi, a, t;

EXPORT Solve()

BEGIN

END;

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation