HP Forums
Help!! programming hp 48G - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Help!! programming hp 48G (/thread-110374.html)



Help!! programming hp 48G - Marco - 03-17-2007

hey! I hope someone could help me!

I have a set of equations that I would like to solve with a program:

A = bd - zd^2
P = b + 2d v(1 + z^2)
R = A/P
V = 1/n * R^(2/3) *(1/2)
Q = A * V

I have already done it with the Multiple Equiation Solver, but I'd like to know if there's another way of doing it. This is what I did:

<<
{'A = bd - zd^2'
'P = b + 2d v(1 + z^2)'
'R = A/P'
'V = 1/n * R^(2/3) *(1/2)'
'Q = A * V'}
'EQ' STO
MINIT
MSOLVR
>>

And then I created another program to erase the variables that it stored:

<<
{A b d z P R V n S EQ Mpar Q}
PURGE
>>

Please help me, I think this is not the best way to do it!





Re: Help!! programming hp 48G - Benny - 03-17-2007

Hi Marco,

This is what I do: I put each formulae in a variable F1, F2, F3, F4.
Then I add a description in the variable TITLE and next I complete the sequence of the params in a list and store it in LVARI.
Be shure the list is complete.
The main program then looks clearly structured:
<< F1 F2 F3 F4 4 \-> LIST STEQ TITLE LVARI MINIT MITM MSOLVR>>

Using STEQ shortens the program.

Hope this helps.

Kind regards,

Benny Vanrutten


Re: Help!! programming hp 48G - Marco - 03-17-2007

Hey Benny thanks for your answer!

I have sone doubts in what you told me: how can I add a title in the global variable?, and what does LVARI do? thanks for your answer!, but I have another doubt, When I don't give a lot of values it tells me that it has TOO MANY UNKNOWS, but with the same values that I give it I can solve the problem mannually but it takes some time, I don't know if I can apply in the program an iteration methor or something, what would you suggest me?

Thanks!,

Marco




Re: Help!! programming hp 48G - Benny - 03-18-2007

Hi Marco,

In the variable LVARI you put ALL your parameters in the sequence you like them to appear on the display above the F-keys: e.g.
{ A b d z P R V ...}
In TITLE you put the title you want to appear on top of the display e.g. "MY EQUATIONS"
TO MANY UNKNOWNS: that is normaly what you get when you did not define enough variables. Perhaps the program needs startvalues.
You can find more in the hp50G users guide on pages 7-10 ... 7-21 (hp50gug.pdf) which you can download from www.hpcalc.org (november 24 2006).
If you like to Purge you can call LVARI and issue PURGE. That saves time. The best way is to run the program in a separate directory.

KR

Benny Vanrutten


Re: Help!! programming hp 48G - Mike Ingle - 03-23-2007

Try my multiple equation solver. Scroll down to multiple equation solver for the HP28C. It works on the 48G too.