is it possible to tilt warning messages?

I would like to tilt warning messages of the mnrfit function.

3 Comments

What do you mean "tilt" ? This term is not clear to me.
I think he means print in italic
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

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.

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 Interactive Control and Callbacks in Help Center and File Exchange

Asked:

on 12 Mar 2015

Commented:

on 31 Mar 2015

Community Treasure Hunt

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

Start Hunting!