Question on pdepe solver

2 visualizaciones (últimos 30 días)
Deepa Maheshvare
Deepa Maheshvare el 10 de Feb. de 2020
Comentada: Deepa Maheshvare el 10 de Feb. de 2020
I'd like to know what's the default absolute and relative tolerance set in pdepe solver.

Respuesta aceptada

John D'Errico
John D'Errico el 10 de Feb. de 2020
Editada: John D'Errico el 10 de Feb. de 2020
Why not just read the help?
That is, first, I typed
doc pdepe
Quickly scan down through there, and I see that indeed, pdepe uses AbsTol and RelTol as two of the options. As wel, it tells me they are created in odeset. So now jump to the help doc for odeset, and I immediately find exactly the desired defaults for those options.
I could also have just typed odeset at the command line however. If defaiults are set in there, it will tell me.
odeset
AbsTol: [ positive scalar or vector {1e-6} ]
RelTol: [ positive scalar {1e-3} ]
NormControl: [ on | {off} ]
NonNegative: [ vector of integers ]
OutputFcn: [ function_handle ]
OutputSel: [ vector of integers ]
Refine: [ positive integer ]
Stats: [ on | {off} ]
InitialStep: [ positive scalar ]
MaxStep: [ positive scalar ]
BDF: [ on | {off} ]
MaxOrder: [ 1 | 2 | 3 | 4 | {5} ]
Jacobian: [ matrix | function_handle ]
JPattern: [ sparse matrix ]
Vectorized: [ on | {off} ]
Mass: [ matrix | function_handle ]
MStateDependence: [ none | {weak} | strong ]
MvPattern: [ sparse matrix ]
MassSingular: [ yes | no | {maybe} ]
InitialSlope: [ vector ]
Events: [ function_handle ]
In fact, we see the first two lines, are those for AbsTol and RelTol. We see the defaults listed there. The docs for ODESET explicitly said the same.
It took me perhaps 30 seconds to find that information, far longer than the time It took me to type this. Learn to use the help in MATLAB.

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by