Post Reply 
28S graphing multiple equations?
11-20-2022, 05:49 AM (This post was last modified: 11-21-2022 05:58 PM by C.Ret.)
Post: #2
RE: 28S graphing multiple equations?
Hello Hal,

On the HP-28S, there are many ways to combine the trace of several functions in one screen.
It all depends on the number of expressions to trace.

Basic method:

In the case where there are only two functions to trace, one may use the trick given in the operating manual by using an equation:

'SIN(X)=COS(X)' [ ] (PLOT) [STEQ] [DRAW] will plot the sine and cosine curves simultaneously.

Programmable method:

The DRAW instruction can be used in a program, but contrary to the soft-menu touches, it does not erase the screen of the HP-28S. This allows the display of multiple functions to be combined at will.
To erase the screen, we will use the instruction CLLCD.
Ending the program with the instruction DGTIZ will leave the graphic cursor active to traverse the screen as done by the [DRAW] soft-menu's touch.

Thus, the following code takes a function as an argument and trace it, then it traces the corresponding derivative. Note the use of 2 RES to space the points of the second curve and thus distinguish it from the first.

« STEQ CLLCD 1 RES DRAW RCEQ 'X' SHOW 'X' δ STEQ 2 RES DRAW DGTIZ » 'DDRW' STO

Thus, 'SIN(X)' DDRW will successively trace the curve of the sine and, in demi-points, its derivative. The display will then ressemble the one obtained with the previous method but will be slower to trace.

Method using a liste:

Inspired by the previous method, it is possible to compose a general code that allows you to trace all the functions of the same variable from a list.
For example:
« CLLCD
1 DO GETI OVER RES STEQ DRAW UNTIL DUP 1 SAME END DROP2
DGTIZ » 'LDRW' STO


The DUP RES sequence is optional, but be carefull several traces on the small HP-28S's screen are difficult to distinguish!!

Usage { 'SIN(X)' 'COS(X)' } LDRW .

Graphical method:

To save time, or use different independent variables, a more elaborate code can be developed that memorizes in the list the name of the tracking variable to be used.
Depending on the problem to be solved, it is possible to save time when tracing the function on the same graphic screen using the instructions LCD→ and →LCD and memorizing the graphic screen after tracing. The OR instruction will combine the trace of a new function with the previous traces.


Conclusion

I hope that these methods will help solve the problem in question with great efficiency.
As often with the HP-28S there are several ways to do any task. Any ones can adapt their codes to their preferred ways of solving it.


EDIT: Corrected Code. See the following posts.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 28S graphing multiple equations? - C.Ret - 11-20-2022 05:49 AM



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