NB. OpGLN_Chaos.ijs NB. using 'user\classes\popnglLRZ.ijs' as OOP class file NB. run init, inita, run initb NB. run 1 2 3 NB. Lorenz Chaos System ================================= dt =: 0.005 s =: 10 r =: 28 R =: 23 b =: 8 % 3 init000 =: 0, 0, 0 init100 =: 1, 0, 0 init010 =: 0, 1, 0 init001 =: 0, 0, 1 init0 =: 8.5, 8.5, 27.3 NB. fixed point init =: 8, 7, 28 inita =: 0, _8, 25 initb =: 8, _8, 25 initc =: 8, _16, 25 initp0 =: (6*%:2), (6*%:2), 27 initp1 =: (6*%:2), (6*%:2), 28 initq0 =: (_6*%:2), (_6*%:2), 27 initq1 =: (_6*%:2), (_6*%:2), 26 lz =: 3 : 0 ('x';'y';'z') =. y. X =. x + dt*s*(y-x) NB. Y =. y + dt*((r*x) - (y + x*z)) Y =. y + dt*((R*x) - (y + x*z)) Z =. z + dt*((x*y) - b*z) X, Y, Z ) NB. Roessler Chaos System =============================== initros =: 1.62 1.36 1 ra =: 0.2 rb =: 0.2 rc =: 5.7 NB. ra =: 0.1 NB. rb =: 0.1 NB. rc =: 14 ros =: 3 : 0 ('x';'y';'z') =. y. X =. x - dt*(y + z) Y =. y + dt*(x + ra*y) Z =. z + dt*(rb + z * (x-rc)) X,Y,Z ) tros =: 3 : 0 ('x';'y';'z') =. y. X =. x - dt*y Y =. y + dt*(x + ra*y) Z =. z X,Y,Z ) tfunc =: 3 : '%: y.' Path =: 1!:40 '' run =: 3 : 0 NB. left arg. = function NB. right arg. = initial values 'lz' run y. : load Path, 'user\classes\popnglLRZ.ijs' FUNC =: x. NB. function DA =: y. NB. initial x, y, z values d1 =: 'DA' conew 'popnglLRZ' ) run0 =: 3 : 0 load Path, 'user\classes\popnglLRZ.ijs' DA =: y. d1 =: 'DA' conew 'popnglLRZ' ) run1 =: 3 : 0 : load Path, 'user\classes\popnglLRZ.ijs' FUNC =: x. DA =: y. d1 =: 'DA' conew 'popnglLRZ' ) testadv =: 1 : 0 u. y. )