Make your own free website on Tripod.com
Kaiser Coefficients
Main Software Page

10 INPUT "STOPBAND ATTENUATION,N";ATT,N
20 GOSUB 1000            'COMPUTE BETA FROM ATTENUATION
30 X = BETA
40 GOSUB 3000             'CALCULATE IO(B)
50 IOB=X
60 IF N MOD 2 = 0 THEN GOSUB 100
70 IF N MOD 2 = 1 THEN GOSUB 200
80 END
100 FOR N1 = -N/2 TO N/2-1
110 X = BETA*SQR(1-(4*(N1+1/2)^2)/(N-1)^2)
120 GOSUB 3000
130 PRINT X/IOB
140 NEXT N1
150 RETURN
200 FOR N1 = -(N-1)/2 TO (N-1)/2 
210 X = BETA*SQR(1-(4*(N1)^2)/(N-1)^2)
220 GOSUB 3000
230 PRINT X/IOB
240 NEXT N1
250 RETURN
1000 IF (ATT > 50) THEN BETA = .1102*(ATT-8.7)
1010 IF (ATT >= 20.96) AND (ATT <= 50) THEN GOSUB 2000
1020 IF (ATT < 20.96) THEN BETA = 0
1030 RETURN
2000  BETA = .58417*(ATT-20.96)^.4+.07886*(ATT-20.96)
2010 RETURN
3000 Y = X/2
3010 T = 1E-08
3020 E = 1
3030 DE = 1
3040 FOR I = 1 TO 25
3050 DE =DE*Y/I
3060 SDE = DE^2
3070 E = E + SDE
3080 IF E*T-SDE > 0 THEN GOTO 3100
3090 NEXT I
3100 X = E
3110 RETURN
Main Software Page