How I make my phase portrait for several initial condition?

14 次查看(过去 30 天)
I'm trying to draw several trajectories for my phase portrait. As an example I'm attaching the file of my function and code to integrate it.
How I put there command like if my parameter is less than or greater than 1/8.
  2 个评论
priya anjali
priya anjali 2020-7-8
I mean to say that plotting for different initial conditions I have to put number of command 'hold on' to execute it. So I'm asking that how to plot for several initial conditions at a time.

请先登录,再进行评论。

回答(1 个)

darova
darova 2020-7-8
Here is a simple example
x0 = [1 2 3];
for i = 1:length(x0)
[t,x] = ode45(f,[0 2],x0(i));
line(t,x)
end

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by