Question on pdepe solver
1 view (last 30 days)
Show older comments
Deepa Maheshvare
on 10 Feb 2020
Commented: Deepa Maheshvare
on 10 Feb 2020
I'd like to know what's the default absolute and relative tolerance set in pdepe solver.
0 Comments
Accepted Answer
John D'Errico
on 10 Feb 2020
Edited: John D'Errico
on 10 Feb 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.
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!