Chapter 17: Activities 491
Using a Program to Guess the CoefficientsUsing a Program to Guess the CoefficientsUsing a Program to Guess the CoefficientsUsing a Program to Guess the Coefficients
Setting Up the Program
Setting Up the ProgramSetting Up the Program
Setting Up the Program
This program graphs the function A sin(BX) with random integer coefficients between 1
and 10. Try to guess the coefficients and graph your guess as Csin(DX). The program
continues until your guess is correct.
Program
ProgramProgram
Program
PROGRAM:GUESS
:PlotsOff :Func
:FnOff :Radian
:ClrHome
:"Asin(BX)"!Y1
:"Csin(DX)"!Y2 Define equations.
:GraphStyle(1,1)
:GraphStyle(2,5) Set line and path graph styles.
:FnOff 2
:randInt(1,10)!A
:randInt(1,10)!B
:0!C:0!D
Initialize coefficients.