Message Boards Message Boards

Copy and paste works for NDSolve argument but variable assignment does not?

Posted 7 years ago

I produce a list of equations to automate the equation argument of NDSolve. Putting in this list as a variable results in the error "Non-numerical output..... ", however outputting the list and copying and pasting it directly leads to the NDSolve evaluation working. My output is very, very long and inconvenient to copy and paste. Is there a way out making this work automatically?

POSTED BY: Taylor Patti
Posted 7 years ago

Can you generate a simple example that displays the problem?

eqs = {x'[t] == -y[t], y'[t] == -x[t], x[0] == 1, y[0] == 0};

sol = NDSolveValue[eqs, {x[t], y[t]}, {t, 0, 10}];

Plot[sol, {t, 0, 10}]

enter image description here

POSTED BY: David Keith
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