comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » differential equation solving when changing the coefficients with time
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: differential equation solving when changing the coefficients with time [message #89943 is a reply to message #89941] Tue, 06 January 2015 08:12 Go to previous message
idlforum2424 is currently offline  idlforum2424
Messages: 2
Registered: January 2015
Junior Member
On Monday, January 5, 2015 8:15:39 PM UTC+1, Craig Markwardt wrote:
> On Monday, January 5, 2015 9:05:00 AM UTC-5, idlfor...@gmail.com wrote:
>> Hi all,
>> I'd like to solve a differential equation in IDL using a Runge Kutta 4th order procedure. However the coefficients of my differential equation evolve with time. How can we pass the coefficients into the function that defines the differential equation or do you have any other way to manage that?
>> Typically my diff equation is something like Y'=aY+b with a and b two functions of time and I want to solve that for all timesteps I have.
>
> IDL's RK4 passes "X" to your differential function. For you, X is time, so you can use this X variable to calculate Y' as you please.
>
> EXAMPLE:
> function differential, x, y
> a = (0.4*x + 10)
> b = (-7.2*x - 0.01*x^2)
> return, a*y + b
> exit
>
> Craig

thanks !
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL unexpectedly exits with 'Killed' message
Next Topic: Colors in 8-bit Z buffer

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:27:22 PDT 2025

Total time taken to generate the page: 0.00452 seconds