
Page 21-52
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
):
•
„
@)CASE@
: Starts the case construct providing the prompts: CASE
THEN END END
•
‚
@)CASE@
: Completes a CASE line by adding the particles THEN
END
Example – program f
3
(x) using the CASE statement
The function is defined by the following 5 expressions:
−
<
≤
<
≤
<
≤
−
<
=
elsewhere
x
if
x
x
if
x
x
if
x
x
if
x
x
f
,
2
15
3
),
exp(
3
5
),
sin(
5
3
,
1
3
,
)
(
2
3
π
π
Using the CASE statement in User RPL language we can code this function as:
«
→
x
«
CASE
‘
x<3
‘
THEN
‘
x^2
‘
END
‘
x<5
‘
THEN
‘
1-x
‘
END
‘
x<3*
π
‘
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:
1.5
@@f3c@
Result
: 2.25 (i.e., x
2
)
2.5
@@f3c@
Result
: 6.25 (i.e., x
2
)
4.2
@@f3c@
Result
: -3.2 (i.e., 1-x)
5.6
@@f3c@
Result
: -0.631266… (i.e., sin(x), with x in radians)
12
@@f3c@
Result
: 162754.791419 (i.e., exp(x))
23
@@f3c@
Result
: -2. (i.e., -2)
Содержание 48GII
Страница 1: ...hp 48gII graphing calculator user s guide H Edition 4 HP part number F2226 90020 ...
Страница 162: ...Page 3 37 Define this function by any of the means presented above and check that g 3 3 g 1 0 g 1 0 g 3 9 ...
Страница 201: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 381: ...Page 11 55 Function KER Function MKISOM ...
Страница 461: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 777: ...Page 26 8 ...
Страница 840: ...Page L 5 ...