Texas Instruments TI-80 User Manual - Page 180
Program: Guess the Coefficients, Set viewing window., Initialize, coefficients., Display data points.
View all Texas Instruments TI-80 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 180 highlights
Program: Guess the Coefficients This program generates a function in the form A×SIN(BX) with random integer coefficients between 1 and 10. Seven data points from the function are plotted. You are prompted to guess the coefficients, which are plotted as C×SIN(DX). The program continues until your guess is correct. It can be modified for other functions. Program PROGRAM:GUESS :FUNC:RADIAN :-31(p/12)"XMIN :31(p/12)"XMAX :p/2"XSCL :-10"YMIN :10"YMAX :1"YSCL :"A×SIN (BX)""Y1 :RANDINT(1,10)"A :RANDINT(1,10)"B :PLOTSOFF: FNOFF :DISPGRAPH :SEQ(XMIN+I×∆X,I,0,62,9)"L1 :Y1(L1)"L2 :PLOT1(¼,L1,L2,›) :DISPGRAPH :PAUSE :"C×SIN (DX)""Y2 :LBL W :CLRHOME :DISP "C×SIN (DX)" :INPUT "C=",C :INPUT "D=",D :DISPGRAPH :PAUSE :IF C=A :DISP "C IS OK" :IF C>A :DISP "C IS TOO HIGH" :IF CB :DISP "D IS TOO HIGH" :IF D