HP 50g User Manual page 709

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

Advertisement

The following program calculates the summation
Using a DO...UNTIL...END loop:
«
«
0.
n S
S "S"
TAG » »
Store this program in a variable @@S3@@. Verify the following exercises: J
3 @@@S3@@
5 @@@S3@@
10 @@@S3@@
30 @@@S3@@
Example 3 – generate a list using a DO...UNTIL...END construct
Type in the following program
«
xs xe dx
'x+dx' EVAL DUP 'x' STO UNTIL 'x xe' END n
and store it in variable @GLIS3.
Check out that the program call
produces the list {0.5 1. 1.5 2. 2.5}.
To see step-by-step operation use the program DBUG for a short list, for
example:
J1 # 1.5 # 0.5 `
['] @GLIS3 `
„°LL @) @ RUN@ @@DBG@
Use @SST @ to step into the program and see the detailed operation of each
command.
DO n SQ S + 'S' STO n 1 – 'n' STO UNTIL 'n<0' END
Result: S:14
Result: S:55
Result: S:385
Result: S:9455
«
xe xs – dx / ABS 1. + xs
n
2
S
k
k
0
4 @@@S3@@ Result: S:30
8 @@@S3@@ Result: S:204
20 @@@S3@@ Result: S:2870
100 @@@S3@@ Result: S:338350
0.5 ` 2.5 ` 0.5 ` @GLIS3
Enter parameters 1 1.5 0.5
Enter the program name in level 1
Start the debugger.
«
n x
xs DO
LIST » » »
Page 21-62

Advertisement

Table of Contents
loading

Table of Contents