how I create improved lorenz code
显示 更早的评论
hi everyone
I want to create improved lorenz code , but its doesnt work well
could someone help me , please

this is my code
function dy= lorenz(t,y)
a = 8/3;
b = 25;
c = 10;
d = 5.3;
e = 17.5;
f = 10.5;
g = 13.3;
h = 14;
if cos(5.3*t)>=0
p=1;
else
p=-1;
end
dy=zeros(3,1);
dy(1)=a*y(1)+p*y(2)*y(3);
dy(2)=y(3)*b-y(3)*c*cos(d*t) - b*y(2)+y(2)+c*cos(d*t);
dy(3)= -1*p*y(1)*y(2)-(e*cos(d*t)+f)*y(2)+(g-h*y(3)*(cos(d*t)));
end
6 个评论
Jan
2021-11-14
If you do see a problem, it is a good idea to explain it clearly. This helps to solve the problem. After reading "its doesnt work well", we have to guess, what the problem is.
Ghofran Khaled
2021-11-14
Jan
2021-11-15
I've implemented it by my own and get an equivalent trajectory.
Ghofran Khaled
2021-11-16
Jan
2021-11-16
If I follow the instructions from scratch, I get the same output as you. So why to you assume that the diagram of the top is the correct solution? It looks like the standard Lorenz attractor, but the formula is something different.
Ghofran Khaled
2021-11-18
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

