How to remove the "Maximum number of function evaluations has been exceeded" prompt when generating random numbers

5 Ansichten (letzte 30 Tage)
Dear
I am trying to calculate the confidence interval of a quantity using the MC method. For that I calculate n=20000 pseudo data. When running the program Matlab continuously prompt:
Exiting: Maximum number of function evaluations has been exceeded
- increase MaxFunEvals option.
Current function value: 0.000219
This prompt is like the program gives in a optimization or root finding routines and I do not understand the reason of this in a random number generator. Is there any way to supress this?
Thanks in advance

Antworten (1)

Walter Roberson
Walter Roberson am 11 Dez. 2017
Yes. You can use lastwarn to find the identifier of the warning and you can use warning() to turn it off.
However it would probably make more sense to debug the code to figure out which function is generating the message, and then to pass an options structure to the function to permit it to take more steps.

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by