Page 21-17
You can also separate the input data with spaces in a single stack line rather
than using
`
.
Programs that simulate a sequence of stack operations
In this case, the terms to be involved in the sequence of operations are
assumed to be present in the stack. The program is typed in by first opening
the program containers with
‚å
. Next, the sequence of operations to
be performed is entered. When all the operations have been typed in, press
`
to complete the program. If this is to be a once-only program, you can
at this point, press
µ
to execute the program using the input data available.
If it is to be a permanent program, it needs to be stored in a variable name.
The best way to describe this type of programs is with an example:
Example
:
Velocity head for a rectangular channel
.
Suppose that we want to calculate the velocity head, h
v
, in a rectangular
channel of width b, with a flow depth y, that carries a discharge Q. The
specific energy is calculated as h
v
= Q
2
/(2g(by)
2
), where g is the acceleration
of gravity (g = 9.806 m/s
2
in S.I. units or g = 32.2 ft/s
2
in E.S. units). If we
were to calculate h
v
for Q = 23 cfs (cubic feet per second = ft
3
/s), b = 3 ft,
and y = 2 ft, we would use: h
v
= 23
2
/(2
⋅
32.2
⋅
(3
⋅
2)
2
). Using the RPN
modethe calculator, interactively, we can calculate this quantity as:
2`3*„º32.2*
2*23㼪/
Resulting in 0.228174, or h
v
= 0.228174.
To put this calculation together as a program we need to have the input data
(Q, g, b, y) in the stack in the order in which they will be used in the
calculation. In terms of the variables Q, g, b, and y, the calculation just
performed is written as (do not type the following):
y
`
b
*„º
g
*2*
Q
㼪/
Содержание 49g+
Страница 1: ...hp 49g graphing calculator user s guide H Edition 4 HP part number F2228 90006 ...
Страница 197: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 377: ...Page 11 55 Function KER Function MKISOM ...
Страница 457: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 775: ...Page 26 10 the location of the backup battery in the top compartment at the back of the calculator ...
Страница 838: ...Page L 5 ...