![HP 50G Скачать руководство пользователя страница 662](http://html.mh-extra.com/html/hp/50g/50g_user-manual_156571662.webp)
Page 21-15
Examples of sequential programming
In general, a program is any sequence of calculator instructions enclosed
between the program containers and ». Subprograms can be included as
part of a program. The examples presented previously in this guide (e.g., in
Chapters 3 and 8) 6 can be classified basically into two types: (a) programs
generated by defining a function; and, (b) programs that simulate a sequence
of stack operations. These two types of programs are described next. The
general form of these programs is input
process
output, therefore, we refer to
them as sequential programs.
Programs generated by defining a function
These are programs generated by using function DEFINE (
„à
) with an
argument of the form:
'function_name(x
1
, x
2
, …) = expression containing variables x
1
, x
2
, …'
The program is stored in a variable called
function_name
. When the
program is recalled to the stack, by using
‚
function_name
. The program
shows up as follows:
«
x
1
, x
2
, … 'expression containing variables x
1
, x
2
, …'».
To evaluate the function for a set of input variables
x
1
, x
2
, …
, in RPN mode,
enter the variables into the stack in the appropriate order (i.e.,
x
1
first, followed
by
x
2
,
then
x
3
,
etc.), and press the soft menu key labeled
function_name
. The
calculator will return the value of the function
function_name
(
x
1
, x
2
, …
).
Example
:
Manning’s equation for wide rectangular channel
.
As an example, consider the following equation that calculates the unit
discharge (discharge per unit width), q, in a wide rectangular open channel
using Manning’s equation:
0
3
/
5
0
S
y
n
C
q
u
=
Содержание 50G
Страница 1: ...HP g graphing calculator user s guide H Edition 1 HP part number F2229AA 90006 ...
Страница 130: ...Page 2 70 The CMDS CoMmanDS menu activated within the Equation Writer i e O L CMDS ...
Страница 177: ...Page 4 10 Function DROITE is found in the command catalog N Using EVAL ANS 1 simplifies the result to ...
Страница 206: ...Page 5 29 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 257: ...Page 7 20 ...
Страница 383: ...Page 11 56 Function KER Function MKISOM ...
Страница 715: ...Page 21 68 Whereas using RPL there is no problem when loading this program in algebraic mode ...
Страница 858: ...Page L 5 ...