Lorentz equation using the Euler method

6 views (last 30 days)
I would like to plot the Lorentz equation using the Euler method.(If possible don't use ODE)
Please give me how to plot it.
for loop seems difficult and i don't understand.
I think the following is completely different
p=10 %初期値
r=28;
b=8/3;
x(1)=10;
y(1)=12;
z(1)=25;
dy(1)=p*y(1)+p*y(2);
dy(2)=-y(1)*y(3)+r*y(1)-y(2);
dy(3)=y(1)*y(2)-b*y(3);
for i=1:length(t)-1;
   y(i+1)=y(i)+v(i)*h
end
plot
  2 Comments
sz
sz on 20 May 2020
Edited: darova on 20 May 2020
lorenz equation
Is this ok?
Please take care of me.
% lorenz equation
dx/dt=-px+py
dy/dt=-xz+rx-y
dz/dt=xy-bz p=10, r=28, b=8/3
x(0)=10, y(0)=12, z(0)=25
euler
y(t+h)=y(t)+h y′(t)

Sign in to comment.

Accepted Answer

darova
darova on 20 May 2020
Try this solution
  2 Comments
Kian Halim
Kian Halim on 5 Oct 2021
Did you ever get this working?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by