Clear Filters
Clear Filters

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

1 view (last 30 days)
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

Answers (1)

Walter Roberson
Walter Roberson on 11 Dec 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.

Categories

Find more on Creating and Concatenating Matrices 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!