HP 35s and Solve button (but not in equation catalogue) - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Calculators (and very old HP Computers) ( /forum-3.html)+--- Forum: General Forum ( /forum-4.html)+--- Thread: HP 35s and Solve button (but not in equation catalogue) ( /thread-2195.html) |

HP 35s and Solve button (but not in equation catalogue) - mcjtom - 09-27-2014 05:33 PM
If Solve button is pressed in regular RPN mode (not in equation catalogue), HP35s ask for the variable to solve for, as it normally would if an equation was chosen in equation catalogue. SELECT FN message follows. Does it mean that it's useless to press SOLVE not being in Equation Catalogue, or is this a valid shortcut (but to solve which equation/programme?). Cheers! RE: HP 35s and Solve button (but not in equation catalogue) - Eddie W. Shore - 09-27-2014 06:23 PM
Not sure but I am thinking shortcut. RE: HP 35s and Solve button (but not in equation catalogue) - Dieter - 09-28-2014 06:05 PM
(09-27-2014 05:33 PM)mcjtom Wrote: Does it mean that it's useless to press SOLVE not being in Equation Catalogue, or is this a valid shortcut (but to solve which equation/programme?). Solve can be used in two different ways. On the one hand it can solve an equation from the list in EQN mode. On the other hand it can be used for solving a function previously programmed by the user. In both cases Solve has to know which equation/program to solve. In EQN mode this is done by simply selecting the appropriate equation from the list. Otherwise, i.e. in regular RPN mode, you tell Solve which program to solve by means of the FN= command (yellow-shifted R/S key). If such a program has not been stated before, the 35s of course does not know what function to solve, and so it asks you ("SELECT FN"). Example: Solve the equation x² – 5 = 0 Code: `A001 LBL A` That's all. Dieter RE: HP 35s and Solve button (but not in equation catalogue) - mcjtom - 09-29-2014 12:42 PM
Dieter, many thanks! I have a related question: In a programme, if I enter an equation as a line, the equation is evaluated (if Flag 11 is set, I'm asked for the variable values, if not the current values are used). But how do I solve (or integrate) an equation in a programme? It seems that Solve Var construct looks for programmes (Var+A,B,C... etc.) not the equations entered in the previous lines or in the Equation catalogue? Can I point Solve to an equation instead somehow? I'm sure I'm missing something in the manual, but I can't find it... Cheers! RE: HP 35s and Solve button (but not in equation catalogue) - Thomas Klemm - 09-29-2014 05:32 PM
(09-29-2014 12:42 PM)mcjtom Wrote: Can I point Solve to an equation instead somehow? You have to wrap your equation in a program with a label: Quote:PRGM TOP Cheers Thomas PS: See 15-4 Solving and Integrating Programs RE: HP 35s and Solve button (but not in equation catalogue) - mcjtom - 09-30-2014 11:12 AM
Brilliant, thanks! Last question: when, for instance, FN=B statement is used, it point to the begining of a B programme (which contains an equation). Is it possible to point FN to a particular line of B-programme (for instance FN=B006). The reason for this question is: do I have to wrap equation as a separate subprogramme (e.g. B) or could I use it within a subprogramme (e.g. B), without having to separate it from the rest of it by giving it a unique Letter-name? Cheers! RE: HP 35s and Solve button (but not in equation catalogue) - mcjtom - 09-30-2014 11:52 AM
When I try to wrap function in programme, I get SOLVE ACTIVE message. What do I do from there? Here is the programme: A001 LBL A A002 FN= A A003 SOLVE B A004 RTN B001 LBL B B002 PxV=NxRxT B003 RTN I invoke it by XEQ A. p.s. Maybe SF 11 has something to do with it, but I wasn't able to successfully use it... RE: HP 35s and Solve button (but not in equation catalogue) - Thomas Radtke - 09-30-2014 04:44 PM
(09-30-2014 11:52 AM)mcjtom Wrote: A001 LBL AWhat are you trying to achive by solving A inside of A? This is a recursion and doesn't work. RE: HP 35s and Solve button (but not in equation catalogue) - Dieter - 09-30-2014 06:27 PM
(09-30-2014 11:52 AM)mcjtom Wrote: When I try to wrap function in programme, I get SOLVE ACTIVE message. What do I do from there? Simple - avoid the error. ;-) The message means that you use Solve (or Integrate, for that matter) within a program that is being solved. Quote:Here is the programme: There is your error. You start the program at label A which then tries to solve itself (FN=A). This obviously makes no sense. You even want to solve for an unknown variable B which is not used anywhere. Please keep in mind: "FN=A" defines the function/program at label A as the one that is to be solved. "SOLVE B" defines variable B as the one you want to know. Here is an example for a correctly working program: A001 LBL A A002 FN=B ; solve the equation following label B A003 SOLVE N ; and solve it for variable N (or P, or V, or R, or T) A004 VIEW N ; display result (required within a program) A005 RTN B001 LBL B ; here is your program/equation B002 PxV=NxRxT ; with these five variables P, V, N, R and T B003 RTN Please note the additional VIEW N statement in A004 that displays the result obtained by Solve. Within a program it is not displayed automatically. Simply because you may want to continue with that result instead of having it displayed. Within a program, Solve also works like a test command: if there is a result, the program continues with the next statement. If no result can be calculated, the next step is skipped (!). (09-30-2014 11:52 AM)mcjtom Wrote: Maybe SF 11 has something to do with it, but I wasn't able to successfully use it... Flag 11 does not make a difference here. It just decides whether you are prompted for the variables or not. With flag 11 cleared you can use a sequence of INPUT statements (one for each variable) at the beginning of the program defining your function, and you will be asked for the known variables – cf. chapter 15 of the 35s manual. Dieter RE: HP 35s and Solve button (but not in equation catalogue) - Dieter - 09-30-2014 06:34 PM
(09-29-2014 12:42 PM)mcjtom Wrote: Can I point Solve to an equation instead somehow? No, there is no way to access the equation list from within a program. (09-30-2014 11:12 AM)mcjtom Wrote: Is it possible to point FN to a particular line of B-programme (for instance FN=B006). No, sorry. Dieter RE: HP 35s and Solve button (but not in equation catalogue) - mcjtom - 09-30-2014 10:28 PM
Thank you! RE: HP 35s and Solve button (but not in equation catalogue) - rprosperi - 10-01-2014 01:09 AM
(09-30-2014 06:27 PM)Dieter Wrote:(09-30-2014 11:52 AM)mcjtom Wrote: When I try to wrap function in programme, I get SOLVE ACTIVE message. What do I do from there? An excellent and clear explanation Dieter! This was quite confusing when I first started using it, and took a while to figure it out. Yours is by far the best explanation of this I've seen. Thanks very much for taking the time to explain it so clearly, including useful tips like the test command behavior. RE: HP 35s and Solve button (but not in equation catalogue) - Dieter - 10-01-2014 05:31 PM
(10-01-2014 01:09 AM)rprosperi Wrote: An excellent and clear explanation Dieter! This was quite confusing when I first started using it, and took a while to figure it out. Thank you very much, Rob. Indeed the syntax of SOLVE can be confusing if you are used to the way it works on the 34C and 15C. These machines do not use lettered variables and simply use the stack for x as well as f(x). Thus here SOLVE is followed by the label defining the function instead of the variable: On a 34C the command SOLVE A solves the function programmed at label A, while the same command on a 35s solves a (separately declared) function for variable A. After I got the 35s this was a bit confusing for me either as I was used to the good old 34C. Dieter RE: HP 35s and Solve button (but not in equation catalogue) - rprosperi - 10-01-2014 06:52 PM
(10-01-2014 05:31 PM)Dieter Wrote:(10-01-2014 01:09 AM)rprosperi Wrote: An excellent and clear explanation Dieter! This was quite confusing when I first started using it, and took a while to figure it out. I believe the 32S and 32SII (and maybe their algebraic bretheren) were similar to the 34C as well. The 34C is the first solver I learned eons ago, and like all first loves (actually 2nd after my 25C, but I digress) it is inherently correct. RE: HP 35s and Solve button (but not in equation catalogue) - Jeff_Kearns - 10-03-2014 06:56 PM
(10-01-2014 06:52 PM)rprosperi Wrote: I believe the 32S and 32SII (and maybe their algebraic bretheren) were similar to the 34C as well. The 34C is the first solver I learned eons ago, and like all first loves (actually 2nd after my 25C, but I digress) it is inherently correct. Karl Schneider wrote an excellent article on SOLVE and INTEG on HP's RPN-based models. Original implementation HP-34C HP-15C HP-41C/CV/CX with Advantage Pac Later implementation HP-32S HP-42S HP-32SII HP-33s HP-35s In it, he describes a method to create a MISO solver for the 34C, 41C and 15C, effectively replicating (or emulating...) the solver functionality in later Pioneer models. Jeff K RE: HP 35s and Solve button (but not in equation catalogue) - Kyburo - 10-09-2014 03:43 PM
(10-01-2014 01:09 AM)rprosperi Wrote: An excellent and clear explanation Dieter! This was quite confusing when I first started using it, and took a while to figure it out. Yours is by far the best explanation of this I've seen. Thanks very much for taking the time to explain it so clearly, including useful tips like the test command behavior. Just wanted to give the same sentiment! I didn't really understand how to write a program with this many variables from the guides I'd read on the 35s, but this suddenly makes a whole lot sense |