【例题1】matlab求解微分方程的解析解

close all
clear
clc
t_final = 100;
x0 = [0; 0; 1e-10];
f = @(t,x)[-8/3*x(1)+x(2)*x(3); -10*x(2)+10*x(3); -x(1)*x(2)+28*x(2)-x(3)];
[t,x] = ode45(f, [0,t_final], x0);
plot(t,x), figure;
plot3(x(:,1),x(:,2),x(:,3));
【例题1】matlab求解微分方程的解析解

close all
clear
clc
t_final = 100;
x0 = [0; 0; 1e-10];
f = @(t,x)[-8/3*x(1)+x(2)*x(3); -10*x(2)+10*x(3); -x(1)*x(2)+28*x(2)-x(3)];
[t,x] = ode45(f, [0,t_final], x0);
plot(t,x), figure;
plot3(x(:,1),x(:,2),x(:,3));