!This program asks for the filename where your

!pendulum force data has been pasted and saved on.

!It reads the file "MYFILENAME" and creates a

!VECTOR F of 4000 rows to index the Force data.

!Then plots F vs "time", and after a pause, the 3-D Attractor's projection..

!You should experiment with different delays (try for sure Tdom/4),

!by changing the DELAY value in LET DELAY=100

!Decide which delay gives a more expanded attractor reconstruction.

!Compare with Figures 7.8 and 7.9 of Addison's textbook.

!Note that this is a "2-D" reconstruction (embedding dimension m=2).

!The program 3M RECONSTRUCTION 3-D does a m=3 reconstruction.

!Compare both representations or "projections" of the attractor.

!

OPEN #1: NAME "MYFILENAME"

!DIM F(4000) creates a vector array where to put your data.

DIM F(4000)

SET WINDOW 0,2500,0.06,.1

SET COLOR "GREEN"

FOR k=0 to 2500 step 100

PLOT k,0;k,1

NEXT k

SET COLOR "BLUE"

DO WHILE MORE #1

INPUT #1:FORCE

LET I=I+1

LET F(I)=FORCE

PLOT I,F(I);

LET SUM=SUM + F(I)

LOOP

LET N=I

PAUSE 2

CLEAR

LET AVER=SUM/I

PRINT N,AVER

!Adjust your WINDOW according to your Force data.

SET WINDOW -.1,.1,-.1,.1

SET COLOR "GREEN"

PLOT 0,0;.3,0

PLOT 0,0;0,.3

PLOT 0,0;-.3,-.3

!

SET COLOR"RED"

LET DELAY=8 !Change these delay value to "expand" the attractor.

FOR I=1 to N-2*DELAY

PLOT 5*(F(I)-AVER)+1.7*(F(I+DELAY)-AVER),1.7*(F(I+DELAY)-AVER)+5*(F(I+2*DELAY)-AVER);

NEXT I

!

END