is it possible to tilt warning messages?

3 views (last 30 days)
Mr M.
Mr M. on 12 Mar 2015
Commented: Guillaume on 31 Mar 2015
I would like to tilt warning messages of the mnrfit function.
  3 Comments
Guillaume
Guillaume on 30 Mar 2015
I think he means print in italic
Mr M.
Mr M. on 30 Mar 2015
I mean not to write anything into the command window by the function.

Sign in to comment.

Answers (2)

Guillaume
Guillaume on 30 Mar 2015
Short answer is no.
Long answer is most likely not. While there are some ways to format text in the command window, none have been found that allow it to be in italics. Only bold and a limited range of colours seems to be possible. In any case, to force the formatting of the error message, you would need to edit the function that issues the error message.
  1 Comment
Guillaume
Guillaume on 31 Mar 2015
after clarification: "I mean not to write anything into the command window by the function."
You can turn all warnings off with:
warning('off')
or a particular warning with ID msgid:
warning('off', msgid)
to get the ID of the last warning:
[~, msgid] = lastwarn

Sign in to comment.


John D'Errico
John D'Errico on 30 Mar 2015
While allowing the user to specify that warning messages be italicized may not be a bad idea, if that is what you like, I believe this is not possible to do at this time.
It would be something you would specify either in the preferences pane, or as an option to warning, which controls how and if warnings appear. (I've looked in R2015a in both of those places, and no such option is shown.)
You could always offer this as a suggestion for the future, by sending the idea into TMW support.

Categories

Find more on Historical Contests in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!