Delay diferential equation solution with dd23
이전 댓글 표시

For first part, I use this code in Live editor:
%Solución ejercicio 7.29 i)
f=@(t,x,z)[z(1,2)^2+z(2,2)^2-6*z(1,1)-8*z(2,3);x(1)*(2*z(2,2)-x(1)+5-2*z(1,3)^2)];%Defino variables de estado, retrasos z y declaro ecuación diferencial principal
lags=[0.5 0.2 0.1];%Defino retardos
f2=@(t,x)[t,exp(t)];
tspan=[0 1.5];%Intervalo de tiempo
sol=dde23(f,lags,f2,tspan);
axis([0 1.5 -10 10])
legend('x','y')
For the second part, I am confused because the condition abut replace the term x^2(t-0.1) for x'(t-0.1) I can't code it. I tried this but I have one error
%Solución ejercicio 7.29 ii)
f=@(t,x,z)[z(1,2)^2+z(3,2)^2-6*z(1,1)-8*z(3,3);x(1)*(2*z(3,2)-x(1)+5-2*z(2,3))];%Defino variables de estado, retrasos z y declaro ecuación diferencial principal
%x=x(1), x'=x(2), y=x(3)
%z1=0.5 z2=0.2 z3=0.1
lags=[0.5 0.2 0.1];%Defino retardos
f2=@(t,x)[t,exp(t),1];
tspan=[0 1.5];%Intervalo de tiempo
sol=dde23(f,lags,f2,tspan);
axis([0 1.5 -10 10])
legend('x','y')
Derivative and history vectors have different lengths.
Please help me thanks
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Holidays / Seasons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!