how to draw a directional field for this equation?

1 回表示 (過去 30 日間)
Matthew Worker
Matthew Worker 2021 年 8 月 26 日
コメント済み: N/A 2021 年 8 月 30 日
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 件のコメント
darova
darova 2021 年 8 月 29 日
Everything is correct. What is the question?
N/A
N/A 2021 年 8 月 30 日
It was a mathematical error. Figured it later. Thank you.

サインインしてコメントする。

採用された回答

KSSV
KSSV 2021 年 8 月 26 日
You may have a look on this file exchange function which help you to plot the directional plot.
  1 件のコメント
N/A
N/A 2021 年 8 月 26 日
I was asked to write it like ive mentioed by my professor. But I will look into this function too.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by