Message Boards Message Boards

What went wrong with this NDSolve command usage?

POSTED BY: INTAN SUPRABA
2 Replies

Hi,

The problem is that you trying to use lists as functions. Make functions from your list with Interpolation[]. Here is a simple example:

Plot[#, {s, 0, 10.}] &@ NDSolveValue[{q'[s] == Sin[s] q[s], q[0] == 1}, q[s], {s, 0, 10.}]
sin = Interpolation[Table[{s, Sin[s]}, {s, 0., 10., 0.1}]];
Plot[#, {s, 0, 10.}] &@  NDSolveValue[{q'[s] == sin[s] q[s], q[0] == 1}, q[s], {s, 0, 10.}]

I.M.

POSTED BY: Ivan Morozov
POSTED BY: INTAN SUPRABA
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract