|
|
BIGSLOPE.8xp
Download BIGSLOPE.8xp
Screenshots
Source Code
:ClrHome
:ClrDraw
:ClrListL5,L6
:FnOff
:"OFF" Str3
:1 M
:1 N
:1 O
:AxesOff
:"LO" Str2
:0 R
:StorePic 0
:1 Q
:
:While (Q 84)
:ClrHome
:
:Output(1,1,"1. ENTER dY/dX")
:Output(2,1,"2. EDIT SETUP")
:Output(3,1,"3. DRAW SLOPES")
:Output(4,1,"4. EULERS METHOD")
:Output(5,1,"5. DRAW SOLUTION")
:
:Output(7,1,"SELECT 1-5, OR 6TO EXIT.")
:
:5 D
:While ((D 92)
and (D 93)
and (D 94)
and (D 82)
and (D 83)
and (D 84))
:getKey D
:End
:ClrHome
:D Q
:
:If (Q 84)
:Then
:
:If (Q=92)
:Then
:Input "dY/dX = ",Str1
:Str Equ(Str1,Y0)
:FnOff
:1 N
:1 O
:"" Y8
:End
:
:If (Q=93)
:Then
:Output(1,1,"1. Xmin = ")
:Output(1,11,Xmin)
:Output(2,1,"2. Xmax = ")
:Output(2,11,Xmax)
:Output(3,1,"3. Ymin = ")
:Output(3,11,Ymin)
:Output(4,1,"4. YMax = ")
:Output(4,11,YMax)
:Output(5,1,"5. RES = ")
:Output(5,10,Str2)
:Output(6,1,"6. AXES = ")
:Output(6,11,Str3)
:Output(7,1,"7. XScl = ")
:Output(7,11,XScl)
:Output(8,1,"8. YScl = ")
:Output(8,11,YScl)
:
:5 D
:While ((D 92)
and (D 93)
and (D 94)
and (D 82)
and (D 83)
and (D 84)
and (D 72)
and (D 73))
:getKey D
:End
:ClrHome
:
:If (D=92)
:Input ("Xmin = ",Xmin)
:
:If (D=93)
:Input ("Xmax = ",Xmax)
:
:If (D=94)
:Input ("Ymin = ",Ymin)
:
:If (D=82)
:Input ("YMax = ",YMax)
:
:If (D=83)
:Then
:not(R) R
:If R=1
:Then
:"HI" Str2
:Else
:"LO" Str2
:End
:End
:
:If (D=84)
:Then
:not(M) M
:If M=1
:Then
:"OFF" Str3
:Else
:"ON" Str3
:End
:End
:
:If (D=72)
:Input ("XScl = ",XScl)
:
:If (D=73)
:Input ("YScl = ",YScl)
:
:If ((D=92) or (D=93) or (D=94) or (D=82) or (D=83))
:Then
:ClrHome
:ClrDraw
:StorePic 0
:1 O
:End
:
:End
:
:If (Q=94)
:Then
:If (O=1)
:Then
:FnOff
:0 O
:
:If (R=1)
:Then
:6 E
:10 F
:16 G
:"HI" Str2
:Else
:8 E
:8 F
:12 G
:"LO" Str2
:End
:
:E(Xmax-Xmin)/94 H
:E(YMax-Ymin)/62 K
:1/(.4H)2 A
:1/(.4K)2 B
:Xmin+0.5H X
:Ymin+0.5K Z
:1 I
:Lbl P
:1 J
:Z Y
:Lbl Q
:Y0 T
:1/sqrt((A+B*T2) C
:T*C S
:X U
:Y V
:Line(U-C,V-S,U+C,V+S)
:V+K Y
:IS>(J,F)
:Goto Q
:U+H X
:IS>(I,G)
:Goto P
:StorePic 0
:End
:
:If (M=0)
:AxesOn
:
:RecallPic 0
:Pause
:AxesOff
:End
:
:If (Q=82)
:Then
:
:Repeat not((N=0) and (P=2))
:If ((N=0) and (P=2))
:1 N
:If (N=1)
:Then
:ClrListL5,L6
:0 W
:Input ("INITIAL X = ",X)
:Input ("INITIAL Y = ",Y)
:Input ("STEP SIZE = ",H)
:ClrHome
:If (M=0)
:AxesOn
:
:While ((X Xmax)
and (X Xmin)
and (Y YMax)
and (Y Ymin)
and (W<999))
:W+1 W
:X L5(W)
:Y L6(W)
:X+H U
:Y+H*Y0 V
:Line(X,Y,U,V)
:U X
:V Y
:End
:
:RecallPic 0
:Pause
:
:AxesOff
:ClrHome
:ClrDraw
:End
:Output(1,1,"TRY REGRESSION MODELS ?")
:Output(4,1,"PRESS 1 FOR YES,2 FOR NO.")
:
:While ((D 92)
and (D 93))
:getKey D
:End
:
:ClrHome
:D-91 P
:If (P=1)
:Then
:
:0 N
:Output(1,1,"1. QuadReg ")
:Output(2,1,"2. CubicReg")
:Output(3,1,"3. QuartReg")
:Output(4,1,"4. LnReg ")
:Output(5,1,"5. ExpReg ")
:Output(6,1,"6. PwrReg ")
:Output(7,1,"7. LOGIstIc")
:Output(8,1,"8. SInReG")
:
:5 D
:While ((D 92)
and (D 93)
and (D 94)
and (D 82)
and (D 83)
and (D 84)
and (D 72)
and (D 73))
:getKey D
:End
:ClrHome
:Fix 3
:
:If (D=92)
:QuadReg L5,L6,Y8
:
:If (D=93)
:CubicRegL5,L6,Y8
:
:If (D=94)
:QuartRegL5,L6,Y8
:
:If (D=82)
:LnReg L5,L6,Y8
:
:If (D=83)
:ExpReg L5,L6,Y8
:
:If (D=84)
:PwrReg L5,L6,Y8
:
:If (D=72)
:LogisticL5,L6,Y8
:
:If (D=73)
:SinRegL5,L6,Y8
:
:Equ Str(Y8,Str4)
:
:Output(1,1,"SOLUTION F(X) = ")
:Output(2,1,Str4)
:Pause
:Float
:FnOff
:End
:
:End
:End
:
:If (Q=83)
:Then
:If (N=0)
:Then
:ClrHome
:Output(1,1,"DRAW EULER'S SOLUTION ?")
:Output(4,1,"PRESS 1 FOR YES,2 FOR NO.")
:
:While ((D 92)
and (D 93))
:getKey D
:End
:
:ClrHome
:
:D-91 L
:
:If L=1
:Then
:Equ Str(Y8,Str4)
:Str Equ(Str4,Y9)
:
:End
:End
:If ((N=1) or (L=2))
:Then
:Input "SOLUTION F(X) = ",Str1
:Str Equ(Str1,Y9)
:End
:ClrHome
:
:If (M=0)
:AxesOn
:DrawF Y9
:RecallPic 0
:Pause
:AxesOff
:FnOff
:
:End
:
:End
:ClrHome
:ClrDraw
:End
:"" Y0
:"" Y9
:"" Y8
:AxesOn
Generated by SourceCoder,
© 2005 Cemetech
|
|