how to build a phase portrait of system of differential equation

조회 수: 2 (최근 30일)
Dmitry Ovcharenko
Dmitry Ovcharenko 2016년 11월 2일
답변: Kushagr Gupta 2016년 11월 9일
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