How I make my phase portrait for several initial condition?

조회 수: 13 (최근 30일)
priya anjali
priya anjali 2020년 7월 8일
댓글: priya anjali 2020년 7월 9일
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
darova
darova 2020년 7월 8일
The question is unclear. Please explain more
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
  댓글 수: 3
darova
darova 2020년 7월 8일
It's just an example. Put ode45 solver inside for loop and get several different solution varying initial condition x0
priya anjali
priya anjali 2020년 7월 9일
It's showing some error.

댓글을 달려면 로그인하십시오.

카테고리

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