Suppress error warnings in matlab (when using parfor loop)
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Anthony Barone
il 13 Mar 2015
Modificato: Anthony Barone
il 19 Mar 2015
I am trying to supress a specific error message in one on my codes (specifically a "no start point" warning in a curve fitting function). I have found the warning using:
w = warning('query','last')
and then disabled/enabled that specific warning at the top/bottom of my script, such that:
warning('off','curvefit:fit:noStartPoint')
*body of script here*
warning('on','curvefit:fit:noStartPoint')
However the warning is not being suppressed. Am I doing something wrong?
Thanks in advance.
0 Commenti
Risposta accettata
Edric Ellis
il 16 Mar 2015
If the warning is being generated on the workers, you need to apply the warning suppression there too. You could do it like so:
spmd
warning('off','curvefit:fit:noStartPoint')
end
1 Commento
Più risposte (1)
Dima Lisin
il 13 Mar 2015
Hi Anthony,
Your script may be generating some other warning. Try checking the last warning again.
2 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!