HP 50g User Manual page 699

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

Advertisement

program_statements, and passes program flow to the statement following the
END statement.
The CASE, THEN, and END statements are available for selective typing by
using „°@) @ BRCH@ @) C ASE@ .
If you are in the BRCH menu, i.e., („°@) @ BRCH@ ) you can use the following
shortcuts to type in your CASE construct (The location of the cursor is indicated
by the symbol
„@) C ASE@: Starts the case construct providing the prompts: CASE
END END
‚@) C ASE@: Completes a CASE line by adding the particles THEN
Example – program f
The function is defined by the following 5 expressions:
Using the CASE statement in User RPL language we can code this function as:
CASE 'x<3' THEN 'x^2' END 'x<5' THEN '1-x' END 'x<3* '
«
«
x
THEN 'SIN(x)' END 'x<15' THEN 'EXP(x)' END –2 END EVAL » »
Store the program into a variable called @@f3c@. Then, try the following exercises:
@@f3c@
1.5
@@f3c@
2.5
@@f3c@
4.2
):
(x) using the CASE statement
3
⎪ ⎪
f
(
x
)
sin(
3
exp(
Result: 2.25 (i.e., x
Result: 6.25 (i.e., x
Result: -3.2 (i.e., 1-x)
2
x
,
if
x
3
1
x
,
if
3
x
x
),
if
5
x
x
),
if
3
x
, 2
elsewhere
2
)
2
)
5
3
15
THEN
END
Page 21-52

Advertisement

Table of Contents
loading

Table of Contents