49g+ program needs help



#2

Hello all, I have a program that I am trying to get right using HPUserEdit 4.0. The purpose of this equation is to be able to solve for any of the variables that I want. If someone has one out there that I can emulate from that would be great! Maybe if I could enter "X" into the variable I need to know or something like that and then have it solve for X... anyway I hope this question is understood, here it is:
«
"Henderson-Hasselback"
{
"pH"
"pKa"
"Cbase"
"Cacid"
}
{ 1 18 }
{ }
{ 0 0 1 1 }
INFORM
IF
THEN
OBJ DROP  pH pKa Cbase Cacid
'pH=pKa+LOG(Cbase/Cacid)' STEQ 30 MENU
"Q" TAG
END
»


#3

Considering the power of the HP49, I'm not so sure I would try use the old 48 Multiple Equation Solver for an equation this simple, nor would I bother to write a program for it, it really isn't necessary.

If this is something you'll use often, create a directory, name it say, Chem. Then store the equation as a named variable, say HH. You can then shove the equation onto the stack, solve symbolically for any of the equation variables, use SUBS to assign numeric values and you have your answer.

You can also store the equation and use the solve equation feature which was also in the old 48. This may be the simplest way to go about what you want.

The best way to handle this sort of thing is to use SolveSys, available for free download from www.hpcalc.org which does a marvelous job of solving linear and nonlinear systems of equations. It is fast, bug free, and when fired up, identifies all variables, which can have values assigned or unassigned, as the user wishes. The program comes with complete loading and using documention. As the program can create a lot of variables, depending on just how big or numerous your equations are, it's a good idea to create a directory to store just this one program in, that way the variables don't interfere with others in Home or other directories. Best of luck.


Edited: 15 Oct 2005, 6:26 p.m.

#4

Ahah! Thanks alot for that info!


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 362 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  HP-41 MCODE: Making an MCODE program call another MCODE program Geir Isene 10 454 01-13-2008, 05:58 AM
Last Post: Raymond Del Tondo
  Re: Porting 49G Programs to 49G+/50G Les Wright 0 141 02-21-2007, 10:16 AM
Last Post: Les Wright
  Porting 49G Programs to 49G+/50G Les Wright 6 341 02-20-2007, 06:27 PM
Last Post: Tim Wessman
  TI-57 Emulator for HP-48S/SX/G/G+/GX, HP-49G and HP-49G+ is finished HrastProgrammer 9 425 01-17-2006, 12:57 AM
Last Post: HrastProgrammer
  How to program rich INFORMs on the 49G+ Karl-Ludwig Butte 2 151 09-27-2005, 03:06 AM
Last Post: Karl-Ludwig Butte

Forum Jump: