How I make my phase portrait for several initial condition?

10 Ansichten (letzte 30 Tage)
priya anjali
priya anjali am 8 Jul. 2020
Kommentiert: priya anjali am 9 Jul. 2020
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 Kommentare
darova
darova am 8 Jul. 2020
The question is unclear. Please explain more
priya anjali
priya anjali am 8 Jul. 2020
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

darova
darova am 8 Jul. 2020
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
  3 Kommentare
darova
darova am 8 Jul. 2020
It's just an example. Put ode45 solver inside for loop and get several different solution varying initial condition x0

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by