필터 지우기
필터 지우기

Generation of Linear Time Vector from ODE45

조회 수: 2 (최근 30일)
Chirag
Chirag 2011년 6월 29일
Good Greetings
I'm working on a code that involves usage of ode45 solver. As far as i can see, 'time' vector is automatically generated by ode45. I'm only providing the first and the last point of time vector, not the step size. The problem is, time vector generated is not linear. I'm providing the link of the plot of time vector which clearly shows my concern.
Kindly suggest me some suitable reason and solution for my problem.
Thanks and Regards.
Chirag Goel

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 6월 29일
That is not strange. By default, ode45 solver uses variable step size. If you want to fix the step size, you might be able to do it by specifying the 'InitialStep' and 'MaxStep' the same value.
[TOUT,YOUT] = ODE45(ODEFUN,TSPAN,Y0,OPTIONS)
help odeset to see all the options.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by