Creating phase portraits using quiver

18 ビュー (過去 30 日間)
Ethan Boyce
Ethan Boyce 2020 年 10 月 9 日
I am trying to use quiver() to build a phase portrait of a funtion and I am having trouble. I know our points of equilibrium and I simply want to illistrate it with the phase portrait to demonstrate stability. Luckily this is a very classic ode model so it shouldnt be difficult I have just never dealt with creating a phase portrait in matlab before. Any help is very appreciated.
global a b r K;
a = 2;
b = 2;
r= 0.48;
K = 17;
syms P;
steady_states = vpa(solve( r*(1-P/K)-a*P/(b^2+P^2), P))
% Pv = -1:0.1:12;
% y = r*Pv.*(1-Pv/K)-a*Pv.^2./(b^2+Pv.^2);
P = 0:0.1:20;
y1 = r.*(1-P/K);
ya = a*P./(b^2+P.^2);
plot(P,y1,'k -',P,ya,'b--','linewidth',3);
quiver(y1,ya) %failed
[x y]=meshgrid(...)
quiver(x,y,y1,ya)%failed

回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by