How to use quiver ?
Mostrar comentarios más antiguos
Hi everyone
I would like to draw a vector field with the function quiver and as an input I have two vectors from the resolution of an differential equation with
function [ dxdt ] = vdp( t,x )
m=0.01;
dxdt(1)=x(2) ;
dxdt(2)=m*(1-x(1).^2)*x(2)-x(1)-10 ;
dxdt=dxdt' ; %on convertit la ligne en colonne
end
Script
[t,x]=ode45(@vdp,[0 1000],[1;1]) to solve the differential equation
plot(x( :,1),x( :,2),'b') to plot the phase portrait
But I tried to use quiver like quiver(x(:,1),x(:,2)) but it doesnt work.
Anyone have an idea about how to do that
Thanks
Respuestas (2)
Ismail Laabdi
el 22 de En. de 2015
Editada: Ismail Laabdi
el 22 de En. de 2015
0 votos
1 comentario
Asma Mahmood
el 10 de En. de 2019
I also want the second one
Asma Mahmood
el 10 de En. de 2019
0 votos
I want to draw a phase portrait of a system of two linear differential equatuions on matlab. How can I draw?
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!

