<SCRIPT language=JavaScript>
var OsObject = "";
if(navigator.userAgent.indexOf("MSIE")>0) {
document.write("");
}
if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
document.write("
");
}
if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
//return "Safari";
}
if(isCamino=navigator.userAgent.indexOf("Camino")>0){
//return "Camino";
}
if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
//return "Gecko";
}
function xdot=lorrenz(t,x)
for t=0:0.1:100;
if(cos(5.3*t)>=0)
p=1;
else
p=-1;
end
end
xdot=[-8/3*x(1)+p*x(2)*x(3);
(-x(2)+x(3))*(25-10*cos(5.3*t));
-p*x(1)*x(2)-(17.5*cos(5.3*t)+10.5)*x(2)+(13.3-14*cos(5.3*t))*x(3)];
tic;
x0=[0;0;1e-10];tspan=[0,100];
[t,x]=ode45(@lorrenz,tspan,x0);
plot(t,x(:,1),'k');
r=length(t)-5000:length(t);
figure; plot(x(r,2),x(r,3),'k')
toc;
|