When running in terminal mode (-nodesktop switch), "help pi" will output a readable message:
>> help pi
PI 3.1415926535897.... PI = 4*atan(1) = imag(log(-1)) = 3.1415926535897....
Reference page in Help browser doc pi
However, evalc('help pi') will output HTML:
>> evalc('help pi')
<strong>pi</strong> 3.1415926535897.... <strong>pi</strong> = 4*atan(1) = imag(log(-1)) = 3.1415926535897....
Reference page in Help browser <a href="matlab:doc pi">doc pi</a>
How can I prevent the generation of HTML when using evalc()?
This is not only a problem for documentation text, but also for messages obtained using MException.message.
I would also appreciate more information on where MATLAB gets these messages from. There is a pi.m file at toolbox/matlab/elmat/pi.m which contains the plain text version of the message. Is the message actually read from this file? What about the HTML version? It doesn't look like the plain text version contains enough markup to generate the HTML from it, so where does the HTML version come from?
My main aim is still to get evalc() to give me the plain text version of messages.
Play games and win prizes!Learn more