File CALC1.FT (FORTRAN source file)

Directory of image this file is from
This file as a plain text file

C      CALC1:PROGRAM TO COMPUTE STEP BY STEP POSITION PROBABILITIES
C      FOR INDEPENDENT ITEM DIFFUSION MODEL
       DIMENSION P(12),P1(12)
1      READ (1,2)TH
2      FORMAT ('THETA=',F4.2)
       DO 10 K=1,4
       READ (1,3)IPOS
3      FORMAT ('INITIAL POSITION=',I2)
       READ (1,5) N
5      FORMAT ('N=',I3)
       DO 11 I=1,12
       P(I)=0.
11     CONTINUE
       P(IPOS)=1.
       DO 20 M=1,N
       P1(1)=P(1)*(1.-TH/2.)+P(2)*TH/2.
       P1(12)=P(12)*(1.-TH/2.)+P(11)*TH/2.
       DO 21 I=2,11
       P1(I)=P(I-1)*TH/2.+P(I)*(1.-TH)+P(I+1)*TH/2.
21     CONTINUE
       DO 22 I=1,12
       P(I)=P1(I)
22     CONTINUE
20     CONTINUE
       WRITE (1,4) (P(I),I=1,12)
4      FORMAT (12F4.2)
10     CONTINUE
       WRITE (1,6)
6      FORMAT (/)
       GO TO 1
       STOP
       END



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search