Plotting Points in a Relation
The following program will plot the points in a relation.
Name = PLOTPTS
:Fn Off
Deactivates all current functions.
:ClrDraw Clears the graphics screen.
:Lbl 1 Sets the marker at position 1.
:Disp “X” Displays the message “X”.
:Input X Accepts an X value.
:Disp “Y=”
:Input Y
:PT-On(X,Y)
Plots the point (X, Y).
:Pause Waits until the user presses the ENTER key.
:Disp “PRESS 0 TO QUIT OR 1 TO PLOT MORE POINTS”
:Input A
:If A = 0
Tests to see if the entered value is 0.
:End If A 0, the program ends.
:Goto 1
Solving a System of Linear Equations
The program below will solve a system of two linear equations written in the
form Ax By C and Dx Ey F.
Name = SLVSYSTM
:Disp “FIRST X-COEFFICIENT”
Displays the quoted message.
:Input A Accepts a value for A.
:Disp “FIRST Y-COEFFICIENT”
:Input B
:Disp :FIRST CONSTANT”
:Input C
:Disp “SECOND X-COEFFICIENT=”
:Input D
:Disp “SECOND Y-COEFFICIENT=”
:Input E
:Disp “SECOND CONSTANT=”
:Input F
:If AE BD 0
If the determinant of the coefficients is zero,
:Goto 1 the program will go to “Lbl 1.”
:(CE BF)/(AE BD) → X Value is calculated and stored for X.
:Disp X
:(AF CD)/(AE BD) → Y
Value is calculated and stored for Y.
:Disp Y
:Goto 2
Program will go to “Lbl 2.”
:Lbl 1
:Disp “INCONSISTENT OR DEPENDENT”
:Lbl 2
63
Commentaires sur ces manuels