Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to enter time into function while solving using ode45?

Subject: how to enter time into function while solving using ode45?

From: Windell

Date: 11 Jun, 2010 04:57:03

Message: 1 of 2

Hi,

I'm attempting to solve a system of equations using ode45. One of the functions has values that are dependent on the current time. Does anyone know how I can access the current time of the solver so I can evaluate the function between steps of the solver?

Thanks,
Windell

Subject: how to enter time into function while solving using ode45?

From: Torsten Hennig

Date: 11 Jun, 2010 07:18:31

Message: 2 of 2

> Hi,
>
> I'm attempting to solve a system of equations using
> ode45. One of the functions has values that are
> dependent on the current time. Does anyone know how I
> can access the current time of the solver so I can
> evaluate the function between steps of the solver?
>
> Thanks,
> Windell

The function in which you calculate dy/dt for the
ODE solver has the current time in its parameter list ...

Best wishes
Torsten.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us