NDSolve::ndnum NDSolveValue::ndnum ParametricNDSolve::ndnum ParametricNDSolveValue::ndnum


  • This message is generated when non-numerical expressions are encountered in a differential equation.
  • The cause of this error can usually be determined by checking the form of the first argument in NDSolve and verifying that numerical values have been assigned to all symbolic parameters.
  • Non-numerical expressions can often be found by replacing the variable, the solution, and all of the derivatives in the input with random or typical values and looking for non-numerical expressions in the result.
  • If you are unable to determine the cause of this message, please send your example to Technical Support.
  • Off[message] switches the message off; On[message] switches it on. For example: Off[NDSolve::ndnum].


Basic Examples  (3)

An error occurs because the input contains a symbolic parameter that does not have a numerical value:

The calculation is successful after a numerical value is assigned for the parameter:

Evaluation of this input gives a plot of the solution:

An error occurs because the solved form of the equations is singular at the initial condition:

One possibility is to start at a small instead of 0:

Setting "EquationSimplification"->"Residual" will avoid the singularity in the solved form of the equations:

You can see that the solutions are essentially the same from their phase plane plot:

An error occurs because the content of the SparseArray is opaque to evaluation:

Use Normal on the SparseArray: