Filter löschen
Filter löschen

Creating phase portraits using quiver

11 Ansichten (letzte 30 Tage)
Ethan Boyce
Ethan Boyce am 9 Okt. 2020
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

Antworten (0)

Kategorien

Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by