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
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!