
:PlotsOff 
:Func
:FnOff 
:Degree
:ClrHome
:1E10->A
:1E10->B
:1E10->C
:1E10->D
:1E10->Z
:Disp "UNITY FREQ GAIN"
:Input "(DB) ",G
:Disp "MIN FREQ (HZ)"
:Input S
:Disp "MAX FREQ (HZ)"
:Input T
:Goto 1
:Lbl 1
:ClrHome
:Disp "NO.POLES(MAX 4)"
:Input P
:If P>4
:Then
:Goto 8
:End
:Goto 2
:Lbl 2
:ClrHome
:Disp "NO.ZEROS(MAX 1)"
:Input Q
:If Q>1
:Then
:Goto 9
:End
:If P=0
:Then
:Goto 4
:End
:Goto 3
:Lbl 3
:ClrHome
:Disp "POLE 1 (HZ)"
:Input A
:If A=0
:Then
:1E-10->A
:End
:If P=1
:Then
:Goto 4
:End
:ClrHome
:Disp "POLE 2 (HZ)"
:Input B
:If B=0
:Then
:1E-10->B
:End
:If P=2
:Then
:Goto 4
:End
:ClrHome
:Disp "POLE 3 (HZ)"
:Input C
:If C=0
:Then
:1E-10->C
:End
:If P=3
:Then
:Goto 4
:End
:ClrHome
:Disp "POLE 4 (HZ)"
:Input D
:If D=0
:Then
:1E-10->D
:End
:Goto 4
:Lbl 4
:ClrHome
:If Q=0
:Then
:Goto 5
:End
:Disp "ZERO (HZ)"
:Input Z
:ClrHome
:Goto 5
:Lbl 5
:log S->Xmin
:log T->Xmax
:1->Xscl
:-40->Ymin
:G+10->Ymax
:10->Yscl
:"20*log ((10^(G/20))*sqrt((A^2+1)*(B^2+1)*(C^2+1)*(D^2+1)*(Z^2+10^(2
*X))/((A^2+10^(2*X))*(B^2+10^(2*X))*(C^2+10^(2*X))*(D^2+10^(2*X))*(Z^2+
1))))"->Y1
:Trace
:DispGraph
:Pause 
:Goto 6
:Lbl 6
:log S->Xmin
:log T->Xmax
:1->Xscl
:-180->Ymin
:180->Ymax
:20->Yscl
:"tan^-1 ((10^X)/Z)-tan^-1 ((10^X)/A)-tan^-1 ((10^X)/B)-tan^-1
((10^X)/C)-tan^-1 ((10^X)/D)"->Y1
:Trace
:DispGraph
:Pause 
:Goto 5
:Lbl 8
:ClrHome
:Disp "ERROR PRESS 1"
:Input "TO CONTINUE",R
:If R=1
:Then
:Goto 1
:End
:Lbl 9
:ClrHome
:Disp "ERROR PRESS 1"
:Input "TO CONTINUE",R
:If R=1
:Then
:Goto 2
:End
 

 
 
