HP 48gII Graphing Calculator Manual de usuario Pagina 699

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 864
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 698
Page 21-50
While this simple construct works fine when your function has only two
branches, you may need to nest IF…THEN…ELSE…END constructs to deal
with function with three or more branches. For example, consider the
function
<
<
<
<
=
elsewhere
xifx
xifx
xifx
xifx
xf
,2
153),exp(
35),sin(
53,1
3,
)(
2
3
π
π
Here is a possible way to evaluate this function using IF… THEN … ELSE …
END constructs:
IF x<3 THEN
x
2
ELSE
IF x<5 THEN
1-x
ELSE
IF x<3π THEN
sin(x)
ELSE
IF x<15 THEN
exp(x)
ELSE
-2
END
END
END
END
A complex IF construct like this is called a set of nested
IF … THEN … ELSE …
END constructs.
A possible way to evaluate f3(x), based on the nested IF construct shown
above, is to write the program:
Vista de pagina 698
1 2 ... 694 695 696 697 698 699 700 701 702 703 704 ... 863 864

Comentarios a estos manuales

Sin comentarios