- #1
hasidim
- 15
- 0
Hi all,
I have a 2nd order ODE I am trying to solve using NDSolve. In the ODE there are two constant coefficients and an initial condition that I want to 'vary'; meaning, I have a table of initial conditions with corresponding constant coefficients.
It is straight forward to solve the ODE using each corresponding set of coefficients and IC individually by inputing the sets individually. However, this is time consuming if I have, say, 100 corresponding sets or more.
Is there a way to 'automate' this process?
To be more clear:
I have a table of values for k, k2, and X_o. I would like to solve the ODE for each set of corresponding values.
Thanks!
I have a 2nd order ODE I am trying to solve using NDSolve. In the ODE there are two constant coefficients and an initial condition that I want to 'vary'; meaning, I have a table of initial conditions with corresponding constant coefficients.
It is straight forward to solve the ODE using each corresponding set of coefficients and IC individually by inputing the sets individually. However, this is time consuming if I have, say, 100 corresponding sets or more.
Is there a way to 'automate' this process?
To be more clear:
Code:
NDSolve[{k* X''[t] + k2* X'[t] + X[t] == 0, X[0] ==X_o, X'[0]==0},X[t],{t,0,tmax}]
I have a table of values for k, k2, and X_o. I would like to solve the ODE for each set of corresponding values.
Thanks!
Last edited: