0
$\begingroup$

I can't understand how the deval function works in matlab, it's hard for me to understand the code, are there any books or descriptions of numerical methods where I can read about numerical algorithms, how to evaluate solutions of differential equations at the right points? I need to implement this feature myself. Thanks for the help!

$\endgroup$
1
  • $\begingroup$ What exactly you do not understand? This function just evaluates the solution of a differential equation at some desired points. This is basically some interpolation. You will have to be more precise about what you want to do. $\endgroup$
    – KBS
    Apr 2 at 19:07

1 Answer 1

2
$\begingroup$

The solvers in last mode mentioned in the documentation of them produce as part of the returned object a "dense output" solution, that is, a piecewise polynomial interpolation, represented by the coefficients for every segment. Many of the standard solvers can produce this interpolation directly from the values of the ODE function produced during the solver step, or with a few additional evaluations.

So deval has just to determine the correct segment, the offset inside that segment, and evaluate the polynomial.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.