필터 지우기
필터 지우기

Explicit solution could not be found

조회 수: 1 (최근 30일)
Stefan
Stefan 2014년 11월 20일
댓글: Stefan 2014년 11월 22일
I'm trying to solve a system of 3 ODE's with initial conditions. When I attempt to run the code, I get the "Explicit solution could not be found" error message. I'm not sure exactly what is wrong with the code. Any help at all would be great!
omega = 10;
b = 8/3;
r = 28;
inits = 'x(0)=0,y(0)=1,z(0)=0';
[x,y,z] = dsolve('Dx=omega(y-x)','Dy=(r*x)-y-(x*z)','Dz=(x*y)-(b*z)')
Thank you!

답변 (1개)

MA
MA 2014년 11월 20일
편집: MA 2014년 11월 20일
<<
>>
These are lorenz equations and you should solve them numerically, for example with ode45, here the solution:
function:
function dx=sae(t,x)
dx=zeros(3,1);
dx(1)=10*(x(2)-x(1));
dx(2)=(28*x(1))-x(2)-(x(1)*x(3));
dx(3)=(x(1)*x(2))-((8/3)*x(3));
end
solver:
[T X]=ode45(@sae,[0 20],[0 1 0]);
plot(T,X(:,1),T,X(:,2),T,X(:,3))
legend('x','y','z')
you can use:
[T X]=ode45(@sae,[0 20],[0 1 0]);
plot3(X(:,1),X(:,2),X(:,3))
  댓글 수: 2
Stefan
Stefan 2014년 11월 22일
Do I have to place the solver inside the function? Whenever I try to run this code, it tells me "This statement is not inside any function."
Stefan
Stefan 2014년 11월 22일
also, I get "Undefined function or variable 't'." inside sae(t,x)

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

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by