21.07.2013 Views

nr. 477 - 2011 - Institut for Natur, Systemer og Modeller (NSM)

nr. 477 - 2011 - Institut for Natur, Systemer og Modeller (NSM)

nr. 477 - 2011 - Institut for Natur, Systemer og Modeller (NSM)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C matlab Code<br />

In the following appendix we provide the most important code that has been used in<br />

this thesis<br />

C.1 Code <strong>for</strong> the Bifurcation Diagrams in Chapter 8<br />

Sample-code used to produce the Hopf bifurcation. The code presented here are <strong>for</strong> Hopf<br />

bifurcation diagram shown in 8.1 and the associated eigenvalue plots seen in appendix<br />

B.1.<br />

clear all<br />

close all<br />

<strong>for</strong>mat long e<br />

global g;<br />

global E;<br />

%--------------------------------------------------------------------<br />

%n=1283; %number of simulations<br />

n=430;<br />

w=0; %initial value <strong>for</strong> w<br />

dw=0.002e-05; %step size<br />

s=zeros(1,n);<br />

V=zeros(n,5);<br />

Q=zeros(n,5);<br />

%initial values <strong>for</strong> M<br />

ini_1 =[1.270545352258887e+006 2.176041550288973e+006...<br />

7.441465343929523e+005 1.615186732129120e+004...<br />

7.031245923372193e+000];<br />

%<br />

<strong>for</strong> r=1:n;<br />

157

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!