
how different the initial conditions are from each other. In this test case, the parameters will be
the same as in Part 1, and the initial conditions will be the only change in the model. The code
to generate the solution to the Rossler equations is given in Listing 1, while the code to generate
the difference between test cases and plot the results is given in Listing 2.
Listing 2: Matlab code – Find Error in System Model
1 % Find e r r o r between two d i f f e r e n t s e t s of i n i t i a l c o n d i t i o n s
2 e = z e r o s ( 1 , s i z e ( t , 2 ) ) ;
3 f o r i = 1 : s i z e ( t , 2 )
4 e ( i ) = norm ( [ x_1( i ) -x_2( i ) ,y_1( i ) -y_2( i ) , z_1 ( i ) - z_2( i ) ] ) ;
5 end
6
7 % Create e r r o r p l o t s
8 f i g u r e
9 t i t l e ( ’ Error Plot ’ )
10 s ubp l o t ( 1 , 2 , 1 )
11 h old on
12 gr i d on
13 gr i d minor
14 pl o t ( t , e )
15 x l a b e l ( ’ Time ’ )
16 y l a b e l ( ’ Euclidean Norm of Error ’ )
17 s ubp l o t ( 1 , 2 , 2 )
18 h old on
19 gr i d on
20 gr i d minor
21 pl o t ( t , l o g 10 ( e ) )
22 x l a b e l ( ’ Time ’ )
23 y l a b e l ( ’ Euclidean Norm of Error ( Log Sc al e ) ’ )
In order to demonstrate the chaotic nature of the attractor, one more case for initial conditions
will be considered. Note that it is also possible to change the parameters of the model (a, b,
and c) in order to obtain similar results. It is also likely that given more time, the solutions will
continue to diverge until the solutions appear to be visibly different on the graphs. The third
solution is given in Figure 4, and has comparably more divergent solutions than Figure 2.
Part 3: Investigate the Effects of Noise
It is important to inspect how noise in the initial conditions affects the solution of the system. In
Part 2, it appears that initial conditions are extremely important in keeping the solutions from
diverging, however more inspection is needed. Here we will look at the model dynamics for
several trials with random noise added to the initial conditions. The code to introduce this noise
in the system is given by Listing 3, with the model dynamics compared to the original model in
Assignment № 6 Page 3