how to build a phase portrait of system of differential equation

5 visualizaciones (últimos 30 días)
Dmitry Ovcharenko
Dmitry Ovcharenko el 2 de Nov. de 2016
Respondida: Kushagr Gupta el 9 de Nov. de 2016
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

Respuestas (1)

Kushagr Gupta
Kushagr Gupta el 9 de Nov. de 2016
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.

Community Treasure Hunt

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

Start Hunting!

Translated by