using quiver to create a vector field for an equation with only 1 variable.
Mostrar comentarios más antiguos
I have an equation which i am trying to use quiver to create a vector field for. the equation can be defined as this. yprime = alpha*y - beta*y.^2 - H where H = ((y.^3)*p)./((y.^3)+q) and alpha and beta are constants. so are p and q. everywhere I look though quiver is used to define problems with two equations. is there a way to use it for this equation?
Respuestas (1)
KSSV
el 27 de Jun. de 2023
alpha = rand ;
beta = rand ;
p = rand ;
q = rand ;
y = linspace(0,1) ;
yprime = alpha*y - beta*y.^2-(((y.^3)*p)./((y.^3)+q)) ;
dyprime = gradient(yprime) ;
plot(y,yprime)
hold on
quiver(y,yprime,yprime,dyprime)
2 comentarios
Elijah Jones
el 27 de Jun. de 2023
Editada: Elijah Jones
el 27 de Jun. de 2023
Elijah Jones
el 27 de Jun. de 2023
Categorías
Más información sobre Vector Fields en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!