Info

This question is closed. Reopen it to edit or answer.

Can Yvv and Yuu be embedded in the program

1 view (last 30 days)
Lan
Lan on 10 Feb 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
Can Yvv and Yuu be embedded in the program
The formulas above without Yvv and Yuu Matlab:edit, Then,the following lines between the percent sign (%) copied to m.file, save %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function dx=myfun(t,x) dx(1)=-6*x(2)*x(2)-9; dx(2)=-3*x(1)*x(2)-2*x(3); dx(3)=x(1)*x(2)+x(3)+8; dx=dx(:); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Matlab: x0=[3,-4,2]; t0=0:0.1:10; [t,x]=ode45('myfun',[0,2],x0); plot(t,x) legend('u','v','Y')
  7 Comments
Lan
Lan on 11 Feb 2015
Edited: Lan on 11 Feb 2015
Thank you! Happy Chinese New Year!恭喜发财!哈哈!
Torsten
Torsten on 11 Feb 2015
Thank you.
One small error in the code I posted:
Replace
Y=-(4*u*v+8)/3;
by
Y=-(4*u*v+8+Y_uu+Y_vv)/3;
Formerly, I used the equations without Y_uu and Y_vv to calculate Y.
Best wishes
Torsten.

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!