Borrar filtros
Borrar filtros

Solving ODE in MATLAB with pre-defined steps

4 visualizaciones (últimos 30 días)
Mahmoud Khadijeh
Mahmoud Khadijeh el 25 de Nov. de 2021
Respondida: HWIK el 25 de Nov. de 2021
Hello,
I would like to solve an ordinary differential equations (ODE) with a specfic step using the command ode45. The equation has a range between 0 and 2.75 and the intial condition is 1
F=@(R,t)((R/t_a)*((CFS(1,i))/(0.25*taw_0)-R))
[t,R]=ode45(F, [0 2.75], 1)
In this case, Matlab provides a set of values (41 values). For example, t is a set of values range between 0 and 2.75.
How can I specify that I do not want random values of t in the ODE? Here, I want t to range between 0 and 2.75 but I want a step size of 0.25
Thanks,

Respuestas (1)

HWIK
HWIK el 25 de Nov. de 2021
I'm affraid that is not an option, this question was answered pretty clearly in this post.
If you want specific points I suggest you simply interpolate them.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by