Borrar filtros
Borrar filtros

Creating phase portraits using quiver

11 visualizaciones (últimos 30 días)
Ethan Boyce
Ethan Boyce el 9 de Oct. de 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

Respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by