A Program With Plotting And Drawing Functions - HP 50g User Manual

Graphing calculator
Hide thumbs Also See for 50g:
Table of Contents

Advertisement

An example of a program using GROB
The following program produces the graph of the sine function including a
frame – drawn with the function BOX – and a GROB to label the graph.
is the listing of the program:
«
RAD
131 R B 64 R B PDIM
-6.28 6.28 XRNG –2. 2. YRNG
FUNCTION
'SIN(X)' STEQ
ERASE DRAX LABEL DRAW
(-6.28,-2.) (6.28,2.) BOX
PICT RCL
"SINE FUNCTION"
1
GROB
(-6., 1.5) SWAP
GOR
PICT STO
{ } PVIEW
»
Save the program under the name GRPR (GROB PRogram). Press @GRPR to run
the program. The output will look like this:

A program with plotting and drawing functions

In this section we develop a program to produce, draw and label Mohr's circle
for a given condition of two-dimensional stress. The left-hand side figure below
shows the given state of stress in two-dimensions, with
normal stresses, and
=
being shear stresses. The right-hand side figure
xy
yx
Begin program
Set angle units to radians
Set PICT screen to 131 64 pixels
Set x- and y-ranges
Select FUNCTION type for graphs
Store the function sine into EQ
Clear, draw axes, labels, graph
Draw a frame around the graph
Place contents of PICT on stack
Place graph label string in stack
Convert string into a small GROB
Coordinates to place label GROB
Combine PICT with the label GROB
Save combined GROB into PICT
Bring PICT to the stack
End program
xx
Here
and
being
yy
Page 22-33

Advertisement

Table of Contents
loading

Table of Contents