"Yair Altman" wrote in message <khc71k$4na$1@newscl01ah.mathworks.com>...
> "Gabriel Papaiz Garbini" <gabrielhpg@gmail.com> wrote in message <khb5oj$7e9$1@newscl01ah.mathworks.com>...
> > Hello everyone!
> >
> > I would really appreciate if someone tells me what's the msgid of the following warning message (so I can disable it without disabling all warning messages in a row):
> >
> > "Warning: Infinite or Not-a-Number value encountered."
> >
> > Just for record, I'm using the function 'quadgk' to calculate an integral in R+ which I use to evaluate the fitness function in a ga optimization. It works very well and it's very fast but in each iteration it keeps showing me the warning message thousands of time (I think it's because I'm integrating from 0 to Infinity, cause the result i get is correct). Not so pleasant ;)
> >
> > Thanks!
> > Sincerely,
> > Gabriel
>
>
> warning off MATLAB:quadgk:NonFiniteValue
>
> To see the msgid of all encountered messages simply use
> warning on verbose
>
> Yair Altman
> http://UndocumentedMatlab.com
Thanks for answering, but now I'm facing a new related problem.
I started using parallel computing to speed up a little bit, and the warning messages started again, the same way before, even if I've disabled everything (using 'warning off all'). From what I conclude that the different processors have independent centers of warning message, each one has to be disabled separately. I'd really appreciate if you tell me how to deactivate those stubborn messages.
For instance, the error message that I get is the following one:
Warning: Infinite or Not-a-Number value encountered.
> In quadgk>vadapt at 287
In quadgk at 205
In genetic_test_3_test at 21
In MATLAB/private/validate>@(x)fitness(x,FitnessFcnArgs{:}) at 136
In MATLAB/private/fcnvectorizer>(parfor body) at 18
In parallel_function>make_general_channel/channel_general at 879
In remoteParallelFunction at 31
Thanks in advance
Gabriel