- Do you want to find out, why your strings produce the warnings? Then post the strings here such that we can give an advice.
- Or do you look for a method to suppress the warnings: don't do this. 1. suppressing a warning takes a lot of time, 2. the strings are still not displayed correctly.
Warning "Unable to interpret LaTeX string ..."
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am getting a very large number of warnings "Unable to interpret LaTeX string ..." while running a MATLAB function that makes a figure with annotations. It is almost as if the warning is printed for every character of processed LaTeX code. Yet the figure is successfully made, so I would like to disable the warning.
What is the identifier of this warning? I found the identifiers 'MATLAB:tex' and 'MATLAB:gui:latexsup:BadTeXString' but they don’t help.
I resorted to "excessive force" but putting my function call between "warnState = warning( 'off' , 'all' ) ;" and "warning( warnState ) ;". But this works in an odd way. When I execute the three calls in a script, I still get the numerous warnings. But when I execute them one by one in the command window, I do not get the warnings. Also, when I put the warning control commands inside the function (at the beginning and the end), I still get the warnings.
0 Kommentare
Antworten (2)
Jan
am 21 Feb. 2012
What is your question?
Jiro Doke
am 21 Feb. 2012
In case you didn't know, you could suppress certain warnings, like this:
warnState = warning('off', 'MATLAB:gui:latexsup:BadTeXString');
But your other problem is that turning off the warning didn't work when it was called inside a function. Try doing this:
dbstop if warning
And then when you enter debug mode, check the status of the warning. I wonder if there's something in the code that turns it back on.
5 Kommentare
Jiro Doke
am 22 Feb. 2012
Gilles,
You can use "lastwarn" function to get the warning ID. Do that when you enter debug mode.
I'm not sure what's going on with your odd warning behavior. Is your figure visualization commands directly in the top-level function? Could they be inside some callbacks? The only thing I can think of is that the vis commands are being called in a subfunction (e.g. callback), and so the warning is being turned back on before the subfunction gets called at some "later time".
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!