Animation of the Lorenz Attractor

조회 수: 1 (최근 30일)
Westin Messer
Westin Messer 2016년 12월 9일
댓글: KSSV 2016년 12월 9일
Hi everybody,
I'm supposed to modify this code so there's a single dot tracing the plot. I think I'm pretty close I just can't completely get it.
function loren3
clear;clf
global A B R
A = 10;
B = 8/3;
R = 28;
u0 = 100*(rand(3,1) - 0.5);
[t,u] = ode45(@lor2,[0,100],u0);
N = find(t>10); v = u(N,:);
x = v(:,1);
y = v(:,2);
plot(x,y);
view(90,90)
M(1)=getframe;
dt=1/100;
for j = 2:1000
t(j)=t(j-1)+dt;
plot(x*t(j),y*t(j),'o','MarkerFaceColor','b','MarkerSize',8)
M(j)=getframe;
if y<=0, break, end
end
pause
movie(M,1)
function uprime = lor2(t,u)
global A B R
uprime = zeros(3,1);
uprime(1) = -A*u(1) + A*u(2);
uprime(2) = R*u(1) - u(2) - u(1)*u(3);
uprime(3) = -B*u(3) + u(1)*u(2);
  댓글 수: 1
Jan
Jan 2016년 12월 9일
편집: Jan 2016년 12월 9일
The youtube link is not working for me, so I cannot guess,what you want to change. It would be efficient, if you explain this directly instead of letting the readers get this most important detail of your question by using an external web service.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2016년 12월 9일
doc comet
  댓글 수: 2
Westin Messer
Westin Messer 2016년 12월 9일
How do I make the comet head go slower?
KSSV
KSSV 2016년 12월 9일
Read the documentation...you can mention time factor as input.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by