The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

hp-prime solver and variable name
Message #1 Posted by fabrice48 on 9 Dec 2013, 4:47 a.m.

About the hp-prime solver in APPS,
If i write this formulla : X = 2*3.14*F*C
i can deal with the capacitive impedance (XC)
but
the correct formulla is not X = but XC.
the problem is :
i can't write in the hp prime solver XC = because the prime understand X*C =.
is there a solution ?

      
Re: hp-prime solver and variable name
Message #2 Posted by Terje Vallestad on 9 Dec 2013, 5:49 a.m.,
in response to message #1 by fabrice48

Hi,

You could try lowercase c in Home view. Works on my calculator

Cheers,

Terje

            
Re: hp-prime solver and variable name
Message #3 Posted by fabrice48 on 9 Dec 2013, 7:13 a.m.,
in response to message #2 by Terje Vallestad

It doesn't work, but i have understood this :
If in the solver i try to write xc =, even in lowercase, i have an error message
but
if, before to go to the solver, i create/declare an variable(real) named xc, it works.
in the same way, i can create a real name Vout and write on the solver this formulla :
Vout = 1.25*(1+R/220)
this is for an LM317 regulator
SO !!!!! strangelly first i have to create a variable with the wished name to be allowed to use it in the solver in a second time
is this the HP-PRIME reality ??

                  
Re: hp-prime solver and variable name
Message #4 Posted by Nigel J Dowrick on 9 Dec 2013, 7:54 a.m.,
in response to message #3 by fabrice48

It's a bit frustrating.

To get around it, start up the SOLVE app and then press Program, and then Edit. Delete the APP program template there, and then add the line EXPORT XC, X_C, x_C, X_c, X_L; including those variables you wish to use.

Go back to the APPS screen and SAVE the SOLVE app under a new name - Reactance, perhaps.

Start your new app. You will find that the variables can now all be used - XC won't be X*C any more.

I don't know whether there's another way to do this, but it's worked for me with a set of projectile equations (u_x, u_y, v_x, v_y, and so on).

It all actually works rather well, but it is a nuisance setting it up. On the other hand, I end up with an App that I can keep and use without cluttering up the main SOLVE app. Then again, where am I going to keep all of these different solver apps? There aren't any folders available ....

Hope this helps.

Nigel (UK)

Note: these EXPORTED variables can be accessed from the Home screen as app variables (Reactance.XC, etc)

Edited: 9 Dec 2013, 7:56 a.m.

                        
Re: hp-prime solver and variable name
Message #5 Posted by Michael de Estrada on 9 Dec 2013, 9:41 a.m.,
in response to message #4 by Nigel J Dowrick

Thanks Nigel. I'll add that to my knowledge base of undocumented/poorly documented features of the Prime. I've been playing with my old 50g alongside the new Prime, and continue to be amazed at how hp has managed to make things that used to be relatively simple and intuitive into an obscure and illogical mess. The plain fact is that the 50g can do everything that I need and that the Prime adds nothing more than a nicer front and back end interface with modern processing speed. About the only feature that the Prime brings that is a real improvement is the Spreadsheet App, and even then it is plagued with bugs and missing critical features.

                              
Re: hp-prime solver and variable name
Message #6 Posted by bluesun08 on 9 Dec 2013, 10:38 a.m.,
in response to message #5 by Michael de Estrada

There is nothing to add.

                  
Re: hp-prime solver and variable name
Message #7 Posted by Terje Vallestad on 9 Dec 2013, 8:12 a.m.,
in response to message #3 by fabrice48

Yes, sorry you have to define the variable first (in my trial uppercase X, lowercase c).

What tricked me was, if you have already entered the function you can delete the variable later (which I did). If you then open the Num view it will ask you if you want to define the new variable. However if you try to edit in Symb view you get an error message. I can find no way of entering the function without declaring the variable first.

Something apparently learned :-)

                        
Re: hp-prime solver and variable name
Message #8 Posted by fabrice48 on 9 Dec 2013, 8:58 a.m.,
in response to message #7 by Terje Vallestad

thank's for your help, but, once more, the hp-prime is for me a deception, too complicate to use it. i imagine the young student in the classroom

                              
Re: hp-prime solver and variable name
Message #9 Posted by bluesun08 on 9 Dec 2013, 9:13 a.m.,
in response to message #8 by fabrice48

But HP don't realize this. Like i said: The Prime is (in this manner) unsuitable for students/education.

Edited: 9 Dec 2013, 9:18 a.m.

                              
Re: hp-prime solver and variable name
Message #10 Posted by Terje Vallestad on 9 Dec 2013, 9:24 a.m.,
in response to message #8 by fabrice48

In HP's defence if you check the user manual it says <<<

In addition to the built-in variables, you can use one or more variables you created yourself (either in Home view or in the CAS). For example, if you've created a variable called ME, you could include it in an equation such as this: Y 2 = G2 + ME.

>>>

I.e. you need to pre define additional variables to the built-in ones. New users of the calculator might pay more attention to the manual than us who has tried all before :-) so they may not be as confused?

Cheers,

Terje

                                    
Re: hp-prime solver and variable name
Message #11 Posted by Michael de Estrada on 9 Dec 2013, 10:11 a.m.,
in response to message #10 by Terje Vallestad

But why not be able to create new variables on the fly within the Solver or Function Apps as they are needed. Instead, you have this convoluted methodology that makes all this far more complex that it needs to be. If you inadvertently attempt to define a reserved name as a variable, you just get a error message like "cannot use reserved name as user defined variable name."

                                          
Re: hp-prime solver and variable name
Message #12 Posted by Don Shepherd on 9 Dec 2013, 10:21 a.m.,
in response to message #11 by Michael de Estrada

Michael, many high-level structured programming languages require the programmer to explicitly define every variable prior to use. This is really a good thing, because it prevents you from coding something like NUM_RECS = NUM_RECS + 1 and later in your code, PRINT NM_RECS and you wonder why NM_RECS is always zero when you know you processed 1000 records. Most languages I used when programming mainframes were like that.

I agree, though. On a hobbyist calculator, it's more of a hindrance than a help.

                                                
Re: hp-prime solver and variable name
Message #13 Posted by Michael de Estrada on 9 Dec 2013, 10:36 a.m.,
in response to message #12 by Don Shepherd

Hi Don,

I've done tons of FORTRAN programming in the distant past on mainframes and understand all that, but this is not the issue here. We have these Apps which should be smart enough to automate all this stuff. I didn't have these kinds of problems with my 50g.

                                          
Re: hp-prime solver and variable name
Message #14 Posted by Nigel J Dowrick on 9 Dec 2013, 10:36 a.m.,
in response to message #11 by Michael de Estrada

On the HP-50g my working folder quickly gets cluttered up with the variables from my most recent use of the Solver. (Financial calculations are particularly bad in this respect.) I know that these variables can be purged, but somehow I never get around to it.

On the Prime, if I want to use anything other than A-Z as a variable I have to create it as an app variable in the Solver, either in the main app or in a renamed copy of the Solver. This avoids the "variable clutter" problem of the HP-50g but at the cost of some inconvenience.

Perhaps, by default, the Solver could create undefined variables as Solver app variables? The clutter problem would be restricted to the Solver, while ease of use would be greatly improved.

Nigel (UK)

                                                
Re: hp-prime solver and variable name
Message #15 Posted by Michael de Estrada on 9 Dec 2013, 10:45 a.m.,
in response to message #14 by Nigel J Dowrick

On the 50g you can create subdirectories for each problem to avoid this clutter. The main VAR home directory simply contains the names of the subdirectories, and the first key in each subdirectory is named BACK, which contains the program <<HOME>>, that returns you to the Home main directory.

Edited: 9 Dec 2013, 10:47 a.m.

                                                      
Re: hp-prime solver and variable name
Message #16 Posted by Peter Murphy (Livermore) on 9 Dec 2013, 11:25 a.m.,
in response to message #15 by Michael de Estrada

'BACK' <<HOME>>: a nice trick. Thanks for that!

                                                      
Re: hp-prime solver and variable name
Message #17 Posted by Han on 9 Dec 2013, 1:06 p.m.,
in response to message #15 by Michael de Estrada

Quote:
On the 50g you can create subdirectories for each problem to avoid this clutter. The main VAR home directory simply contains the names of the subdirectories, and the first key in each subdirectory is named BACK, which contains the program <<HOME>>, that returns you to the Home main directory.

Or, create a custom menu at the top directory. Just save:

{ UPDIR HOME } 'CST' STO

Now you don't have to recreate 'BACK' in each subdirectory. Just go to the custom menu and use the shortcuts there.

                                                            
Re: hp-prime solver and variable name
Message #18 Posted by Joe Horn on 10 Dec 2013, 8:53 p.m.,
in response to message #17 by Han

Quote:
Or, create a custom menu at the top directory. Just save:

{ UPDIR HOME } 'CST' STO

Now you don't have to recreate 'BACK' in each subdirectory. Just go to the custom menu and use the shortcuts there.


Why not just use the built-in HOME key? Just press and hold down the left-shift key, then press VAR. Voilą: HOME. No programming or custom menus or key assignments needed.
                                                                  
Re: hp-prime solver and variable name
Message #19 Posted by Steve Simpkin on 10 Dec 2013, 10:43 p.m.,
in response to message #18 by Joe Horn

Quote:

.....No programming or custom menus or key assignments needed.



Well where's the fun in that :)
                                          
Re: hp-prime solver and variable name
Message #20 Posted by Terje Vallestad on 9 Dec 2013, 4:29 p.m.,
in response to message #11 by Michael de Estrada

Hi Michael,

I do not disagree with you, all I am saying is that newcomers to the HP world may have less expectations of how it is "supposed" to work and look more for guidance in the manual. Being able to create variables on the fly would be far better than my understanding of the current system suggests.

Cheers,

Terje

      
Re: hp-prime solver and variable name
Message #21 Posted by Thomas Chrapkiewicz on 9 Dec 2013, 11:51 a.m.,
in response to message #1 by fabrice48

Capacitive Reactance is the reciprocal of (2*pi*f*C)

            
Re: hp-prime solver and variable name
Message #22 Posted by fabrice48 on 9 Dec 2013, 1:22 p.m.,
in response to message #21 by Thomas Chrapkiewicz

thomas !!!!!!!
it's EXACTLY what i've written
i CHOOSE to use 3.14 instead of PI to be more clear in my details problems because of PI ....P*I.
just because of this

Edited: 9 Dec 2013, 1:23 p.m.

                  
Re: hp-prime solver and variable name
Message #23 Posted by fabrice48 on 10 Dec 2013, 3:25 a.m.,
in response to message #22 by fabrice48

OHHHH YESSSSS you are right,
let me explain, on the hp48gx we can deal easyly with our own formulla.
on a previons thread CYRILLE xeplain me in prime i can't deal with more than 10 equation at a time.
the solution was to copy the APPS solver each time i need a new formulla group.
In my actual group i write equation for inductor and capacitor, and you are right i do in my example a big mix, a big soup excuse me. fab


[ Return to Index | Top of Index ]

Go back to the main exhibit hall