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

5 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Walter Roberson
Walter Roberson il 11 Dic 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.

Categorie

Scopri di più su Linear and Nonlinear Regression in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by