Message Boards Message Boards

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

GROUPS:

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
Answer
15 days 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
Answer
14 days ago

Group Abstract Group Abstract