Effacer les filtres
Effacer les filtres

how to draw a directional field for this equation?

1 vue (au cours des 30 derniers jours)
Matthew Worker
Matthew Worker le 26 Août 2021
Commenté : N/A le 30 Août 2021
I am trying to plot directional field for these differential eq.s
a) y’= 0.1y-sin(y)
b) y’ = y^2-3*y+1
c) y’ = -y(y-2)(y-4)/10
I was trying to write it like this, but then I am not sure how to give x.
[x, y] = meshgrid(-2:0.2:3, -1:0.2:2);
s = 1 - x.*y.^2;
% for slope function
% f = 1 - x y^2
quiver(x,y, ones(size(s)),s), axis tight
  2 commentaires
darova
darova le 29 Août 2021
Everything is correct. What is the question?
N/A
N/A le 30 Août 2021
It was a mathematical error. Figured it later. Thank you.

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 26 Août 2021
You may have a look on this file exchange function which help you to plot the directional plot.
  1 commentaire
N/A
N/A le 26 Août 2021
I was asked to write it like ive mentioed by my professor. But I will look into this function too.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by