필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 12월 11일
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.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by