how to build a phase portrait of system of differential equation

5 次查看(过去 30 天)
I want to draw a phase portrait of an elleptic vortex function xdot = vdp1(t,x) xdot = zeros(2,1); e = 0.15; lambda = 0.02; xdot(1) = 2*e*x(1)*cos(2*x(2)); xdot(2) = lambda+((x(1)/(x(1)+1)^2))-((x(1)^2+1)/(x(1)^2-1))*((sin(x(2)))^2)*e;
[t,x] = ode45('vdp1',[0 20],[1 0],1.e-3,0); plot(x(:,2),x(:,1)) size(t) plot(t,x(:,1),'r',t,x(:,2),'b-.')
. Please help

回答(1 个)

Kushagr Gupta
Kushagr Gupta 2016-11-9
I understand that you want to draw a phase portrait in MATLAB and would like to know more about that.
There is a function in MATLAB by the name of ' quiver ' which helps in plotting velocity plots (phase portraits). The documentation goes through an illustrative example too and I would recommend going through it.
PS : For future questions, consider writing equations on separate lines to improve readability.

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by