Variable precision arithmetic in ode45 and others?
Mostrar comentarios más antiguos
Is it possible to use vpa in ordinary differential equation solvers like ode45?
Respuesta aceptada
Más respuestas (2)
John D'Errico
el 29 de Oct. de 2020
0 votos
Short answer - no.
Long answer - nnnnoooooo.
ODE45 uses only singles or doubles. Nothing symbolic. vpa is a symbolic tool.
2 comentarios
Michael Croucher
el 29 de Oct. de 2020
John D'Errico
el 29 de Oct. de 2020
I suppose it may happen one day. For example, vpaintegral appeared a few years ago. They could provide a tool to do the same for an ODE. But I don't see it happening soon.
Steven Lord
el 30 de Oct. de 2020
0 votos
What types of differential equations are you trying to solve that you need to use arbitrary precision arithmetic?
If you're trying to solve the ODE symbolically rather than numerically, take a look at the dsolve function in Symbolic Math Toolbox.
If you have computed a symbolic equation for the right-hand side of your system of ODEs, you can convert that into a form that the numeric ODE solvers in MATLAB (like ode45) can accept that operates on double arrays using odeFunction also in Symbolic Math Toolbox.
This documentation page may be of interest.
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!