Post Reply 
Solving for equations the HP50, 49.. way.
03-24-2023, 06:06 PM (This post was last modified: 03-24-2023 06:09 PM by gehakte_bits.)
Post: #7
RE: Solving for equations the HP50, 49.. way.
When using the Solver, you have to use globals (A-Z etc.) or create globals (pre-define or EXPORT var1, var2; )
1) You can define (<Shift> <Define>) a function_name with a function "2X=2Y" followed by E1:=EVAL(function_name),
then use the Solver, check <E1>, and solve in <Num>

2) or use a program (same Solver concept) such as
Code:
// 2023.0322 pretty-prime v0.3b
#pragma mode(separator(.,;) integer(h32))

// for solver declare global vars, or use 'home' vars
EXPORT Bsea_p1,Bair_p2,B_t,B_h;             // pressure 1, 2, temp, height

EXPORT Baro()
BEGIN 
LOCAL x;
  // initial seed values
  Bsea_p1:=1007;                            // p1
  Bair_p2:=974;                             // p2
  B_t:=20;                                  // temp
  B_h:=286;                                 // height

  // seed solver equate
  E2:='Bair_p2=Bsea_p1*(1-(0.0065*B_h)/(B_t+0.0065*B_h+273.15))^5.257';
  FOR x:=0 TO 9 DO 
    Solve.UNCHECK(x);
  END;
  Solve.CHECK(2);                           // select E2
  STARTAPP("Solve");
  STARTVIEW(2);                             // show num view
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Solving for equations the HP50, 49.. way. - gehakte_bits - 03-24-2023 06:06 PM



User(s) browsing this thread: 1 Guest(s)