You are on page 1of 7

# DA2_FX7400G_03.

CHAPTER 3

## Note 3A Recursion on a List

(See Note 0D for a review of recursion and iteration and Note 1B to review
entering a list while in RUN mode.)
When defining a recursive operation, the value you want to use can come
from a list, or it can be a single number, as in Note 0D. If you want to
generate two patterns at once or keep track of the term numbers of a
sequence, using recursion on a list can be useful. To do this, enter values
into a list from the Run screen. Remember that you get to the list
commands by pressing OPTN F1 (LIST). The list entries must be enclosed in
braces. Then, create a formula line that performs an operation on the list
you created and store the new value into the original list. You can view the
new list by entering List 1 followed by EXE . In this example, {1, 4} is entered
into List 1, and then 1 is added to the first term and 7 is added to the second
term to produce the new list, {2, 11}.

Pressing AC/ON and then pressing REPLAY up twice allows you to replay the list
operation. (See Note 4A.) Pressing EXE again creates the next entry in the
list. View the updated list by entering List 1 and pressing EXE .

The previous screens show a sequence of lists, each containing two terms.
The pattern of the first terms in each list is a sequence that starts with 1 and
increases by 1 each time. This sequence also numbers the lists. The pattern of
the second terms in each list is a sequence that starts with 4 and increases by
7 each time. For example, the list {3, 18} indicates that 18 is the third term in
the sequence that begins with 4 and increases by 7 with each new term.

## Note 3B WALKER Program

[This version of the program collects data for about 14 seconds. The
distances measured should be from 0.5 to 4 meters. The speeds should
be from 1.5 to 1.5 m/s.]
This program will collect and graph distance-time data or velocity-time data
using a motion sensor. Each WALK command allows you to see the graph
being constructed as the data is collected. Make sure that nothing is between
the walker and the motion sensor. Also, objects on either side of the walker
can interfere with the data collection, so make sure the walker has plenty of
free space on either side. Always press EXE to continue execution of the
program after a pause. To start, you must select one of the following
commands. Press the appropriate number followed by EXE .
1. FREE FORM

2. WALK LINE

(continued)

27

3. WALK PATH

fx-7400G Plus

## expects you to put an equation into Y1 in GRAPH mode before you

start the program and then to match the path it makes.
4. FUNCTION

graphs meters per second and time. You must try to match three
horizontal segments.
5. SPEED

6. REPEAT

## repeats the previous command with the same graph.

Before you begin to walk, you will have a chance to study the graph. Pressing
SHIFT [Trace] will allow you to see the coordinates of certain points on the
graph. When you are ready to start walking, press EXE .

File Name:WALKER

ClrText

"ALWAYS PRESS"

"4. MORE"

"IN METERS."

?A

"TIME IS IN"

A=1Goto 1

"SECONDS."

A=2Goto 2

"SPEED IS IN"

A=3Goto 3

"MS."

"4. FUNCTION"

"CHECKING"

"5. SPEED"

"6. REPEAT"

"COM ERROR,"

"7. QUIT"

"MAKE SURE"

?A

A=1Goto 1

"CONNECTIONS"

A=2Goto 2

"ARE TIGHT."

A=3Goto 3

## "THEN PRESS AC AND RUN "

A=4Goto 4

"PROGRAM "

A=5Goto 5

"AGAIN."

A=6Goto 6

For 1X To 500:Next

A=7Goto 7

{1,0}List 1

Lbl 1

Send(List 1)

{0}List 3

"CONNECTION"

{0}List 4

"GOOD."

Goto A

15T:4D

Lbl 2

{1,0}List 6

Seq((Int (2DRan#))+1,X,1,4,1)2List 4

{1,4,2}List 2

{0,T,2T,3T}List 3

ClrGraph

Goto A

Lbl 0

Lbl 3

(continued)

28

fx-7400G Plus

## (File Name: WALKER continued)

Seq((Int (2DRan#)+1),X,1,4,1)2List 4

IfEnd

{0,T3,2T3,T}List 3

If J>2

Goto A

## Then F-Line .8(J-1),V,.8(J-2),W

Lbl 4

IfEnd

Seq(X,X,0,T,1)List 3

VW

Seq(Y1,X,0,T,1)List 4

Next

Goto A

Seq(.8J,J,0,N-1,1)List 1

Lbl A

If A=5

ViewWindow 0,T,1,0,D+.5,1

## Then List 6List 2

S-WindMan

IfEnd

S-Gph1 DrawOff

S-Gph1 DrawOn,Scatter,List 1,

S-Gph3 DrawOff

List 2,1,Dot

For 0X To 15

{1,0}List 6

For 1Y To 4

Send(List 6)

PlotOn X,Y

PlotOn 0,0

Next

ClrText

Next

ClrGraph

AB

Lbl B

Goto 0

## "STUDY THE "

Lbl 5

"GRAPH. PRESS"

0R

"EXE TO START"

Lbl C

"COLLECTION."

ClrGraph

DrawStat

S-Gph2 DrawOff

{3,.05,1,0,0}List 5

S-Gph1 DrawOff

{1,4,2}List 2

ViewWindow 0,15,1,1.6,1.6,1

Send(List 6)

If 0=R

Send(List 2)

Send(List 5)

List 4

19N

## List 4[1]List 4[2]

Seq(0,X,1,N,1)List 2

## List 4[3]List 4[4]

Seq(0,X,1,N,1)List 6

## List 4[5]List 4[6]

For 1J To N

{0,5,5,10,10,15}List 3

IfEnd

XList 2[J]

XV

DrawStat

If A=5

Goto B

Then If J>1

Lbl 6

BA

VList 6[J]

If A=5

IfEnd

Then 1R

IfEnd

Goto C

PlotOn .8(J-1),V

IfEnd

If J=2

Goto A

Then If A5

Lbl 7

ClrText

IfEnd

29

## DA2_FX7400G_03.qxd 01/03/2006 02:46 PM Page 30

fx-7400G Plus
Note 3C INOUT Program
In this program, you write a linear rule or linear expression that links a
set of input values to corresponding output values. Before executing the
program, choose a difficulty level that is easy, medium, or hard. We
recommend that you choose EASY until you get a string of rules correct
on the first try. If you make an incorrect guess, the program displays your
results and allows you to try again.

## You will be prompted for values of A and B in the expression A  Bx.

In other words, A will be the start value and B will be the rate of change.
When looking at the lists on the calculator screen, column X contains the
in values and column Y1 contains the out values. After you have made a
guess, column Y2 contains the values computed using your guess. You will
have to scroll to the right to see the values for Y2. Notice that you cannot see
the Y1 and Y2 columns at the same time. Also, be sure to scroll down to see
more values in the lists. Press EXE to continue after a pause in the program.

Cleanup
This program uses a table to display the values. The x-values for the table
come from List 1. If you quit the program before the end, the settings for
TABLE may be different from your expectation. To change the x-values for the
table back to a range, select TABLE from the Main Menu. Press SHIFT [SET UP]
F1 (RANG). You may also want to delete the expressions for Y1 and Y2.
File Name:INOUT

ClrText

Y=Type

"1. EASY"

For 1J To 10

"2. MEDIUM"

T SelOff J

"3. HARD"

Next

"4. QUIT"

{0,1,2,3,4,5}List 1

?A

"ALWAYS PRESS"

A=1Goto 1

"EXE TO GO ON."

A=2Goto 2

ClrText

A=3Goto 3

"THE PROGRAM"

A=4Goto 8

"WILL DISPLAY"

Lbl 1

## "2 LISTS "

Seq(Int (Ran#11)-5,X,1,2,1)List 4

"RELATED BY"

Goto 5

Lbl 2

Lbl 0

(continued)

30

fx-7400G Plus

## (File Name: INOUT continued)

Seq(Int (Ran#15)-7,X,1,2,1)List 4

12A

4B

T SelOn 1

2C

T SelOff 2

Goto 4

VarList1

Lbl 3

## "X IS IN. Y1"

Seq(Int (Ran#19)-9,X,1,2,1)List 4

37A

"OWS SCROLL."

9.5B

DispF-Tbl

1C

Goto 4

"WILL BE"

Lbl 4

## "IN THE FORM "

0N

Do

Seq(0,X,1,A,1)List 2

"A + BX"

Do

"A"?A

Int (Ran#A)+1X

"B"?B

If List 2[X]=0

"A+BX"Y2

## Then 1List 2[X]

Seq(0,X,1,6,1)List 3

N+1N

For 1D To 6

IfEnd

List 1[D]X

LpWhile N<6

Y2List 3[D]

1Y

Next

For 1X To A

T SelOn 2

If List 2[X]=1

1+YY

IfEnd

DispF-Tbl

Next

Goto 5

"RIGHT"

Lbl 5

Lbl 8

ClrText

VarRange

## Note 3D LINES Program

You can practice writing the equation of a line using this program. Before
you begin, clear any equations you may have stored in GRAPH mode.
When you run the LINES program, the graph of a line will appear. In
the EASY option, the y-intercept will always appear on the screen. In the
HARD option, the y-intercept may or may not be visible on the screen.
Run the program and follow these steps.
a. Press 1 EXE to select the EASY option, or 2 EXE to select the
HARD option.
b. Read all directions on the calculator screen. Always press EXE to go
to the next screen.
c. When you get to the screen with the graph, study the graph and
determine values that will help you write the equation of the line.
You can trace on the line by pressing SHIFT [Trace] to see the
coordinates of individual points.
(continued)

31

## Note 3D LINES Program (continued)

fx-7400G Plus

d. Press MENU 4 to enter GRAPH mode. Enter the equation. Store the
equation by pressing EXE .
e. Press F4 (DRAW) to compare the graph of your line to the
programs line.
f. If the two lines dont match, press QUIT and repeat steps b, c, and d
until they do. You can enter new equations on other lines, or you
can replace your old guess with a new one.
g. When the graphs match, you will see them as one line. Trace and
switch from one line to the other by pressing the arrow key up and
down. You can see by the equation in the upper-left corner that
there really are two lines.
h. If you wish to play again, press MENU and enter PRGM mode to run
the program.

Cleanup
When you are finished running the program, you might want to clear any
equation that is hidden in Y10.
File Name:LINES

Int (Ran#13)-6B

Y=Type

Int (Ran#13)-6D

## "ALWAYS PRESS EXE TO"

(D-B)(C-A)M

"GO ON."

If K=1

"AFTER THE"

Then MA+B<4Goto 1

"GRAPH PRESS"

MA+B>4Goto 1

"B+M(X-A)"10

G SelOn 10

"EQUATION."

DrawGraph

## "TO GET A NEW"

For 7X To 7

"LINE"

For 4Y To 4

"PRESS EXE."

PlotOn X,Y

"EASY 1 OR"

Next

"HARD 2"

Next

?K

Else "B+M(X-A)"10

S-WindMan

G SelOn 10

For 1X To 9

DrawGraph

G SelOff X

For 7X To 7

Next

For 4Y To 4

ViewWindow 7.8,7.8,1,4.6,4.6,1

PlotOn X,Y

Lbl 1

Next

Int (Ran#18)-9A

Next

Int (Ran#((A+1)+10))+A+1C

32

## DA2_FX7400G_03.qxd 01/03/2006 02:46 PM Page 33

fx-7400G Plus
Note 3E Collecting Distance Data Using the EA-100 or EA-200
This program, BASICDIT, allows you to collect time and distance data. A
sonic motion detector must be connected to the data collector, which is then
connected to the calculator. Before running the program, go to the Stat
screen and set the View Window to Auto.
The program will collect distance measurements from a target for
approximately 10 seconds. It will then display the data as a graph of distance
versus time. Press EXE and immediately move away from the target at a
constant rate for 10 seconds. When finished, press EXE to display the graph.

File Name:BASICDIT
Cls
ClrList
{1,0}List 6
Send(List 6)
{1,4,1}List 6
Send(List 6)
{3,.5,10,1}List 6
Send(List 6)