Example of MISO solver for WP 34s
|
05-24-2018, 06:17 PM
(This post was last modified: 05-24-2018 06:59 PM by Dieter.)
Post: #7
|
|||
|
|||
RE: Example of MISO solver for WP 34s
(05-23-2018 07:36 PM)Dieter Wrote: So there should be a better solution for flagging the variable to solve for. I have been thinking about several methods, but none is really convincing. Maybe someone has a better idea? If the input can be essentially ...anything, there are two basic methods: - At the input prompt, press a key like B or C to continue at a different position in the program. This sounds nice ("simply press B at the input prompt when this is the variable you want to solve for"), but it will not work here as it pops the return stack. So the next RTN will not return from the pending subroutine call (LBL 99 or "VAR") to continue with the next variable input, instead the program will simply stop. However, this can be fixed by changing the XEQ calls into GTOs and then jump back to the next variable input with a GTO→J. Of course this requires ten additional labels 01...10. If you want to give it a try, here is the code. Press B when the variable to solve for shows up. Code: 001 LBL A - Use a flag. That's what the next version does. Here the program expects the user to set flag A when the prompt for the variable to solve for appears (press SF A). This turns on the big "=" sign in the display, so there is a visual feedback. Here is the code: Code: 001 LBL A In both cases the program also takes the input at this prompt as an estimate for the solution. It feeds 1/2x and 2x this value as the two initial guesses into the solver. So if you enter 100 the first two guesses are 50 and 200. Adjust this as you like with the two factors in line 049/051 or 039/041, respectively. Now try it and see if this works for you. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Example of MISO solver for WP 34s - gomefun2 - 05-22-2018, 09:29 AM
RE: Example of MISO solver for WP 34s - Dieter - 05-22-2018, 05:40 PM
RE: Example of MISO solver for WP 34s - Dieter - 05-22-2018, 07:43 PM
RE: Example of MISO solver for WP 34s - burkhard - 05-23-2018, 05:47 PM
RE: Example of MISO solver for WP 34s - Dieter - 05-23-2018, 07:36 PM
RE: Example of MISO solver for WP 34s - Dieter - 05-24-2018 06:17 PM
RE: Example of MISO solver for WP 34s - gomefun2 - 05-23-2018, 09:57 PM
|
User(s) browsing this thread: 1 Guest(s)