![]() |
KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
CPRINTF displays styled formatted text in the Command Window. More...
Go to the source code of this file.
Functions | |
function count = | cprintf (style, format, varargin) |
CPRINTF displays styled formatted text in the Command Window. More... | |
function [
underlineFlag , boldFlag , style ] = | cprintf>processStyleInfo (style) |
function
styleName = | cprintf>getColorStyle (rgb) |
function delta = | cprintf>getUrlsFix (docElement) |
function | cprintf>fixHyperlink (docElement) |
function | cprintf>setElementStyle (docElement, style, specialFlag, majorVersion, minorVersion) |
function | cprintf>dumpElement (docElements) |
function cells = | cprintf>m2c (data) |
function | cprintf>showDemo (majorVersion, minorVersion) |
CPRINTF displays styled formatted text in the Command Window.
Definition in file cprintf.m.
function count = cprintf | ( | style, | |
format, | |||
varargin | |||
) |
CPRINTF displays styled formatted text in the Command Window.
CPRINTF then displays the text in the Command Window using the specified STYLE argument. The accepted styles are those used for Matlab's syntax highlighting (see: File / Preferences / Colors / M-file Syntax Highlighting Colors), and also user-defined colors.
<tt>Text</tt> - default: black <tt>Keywords</tt> - default: blue <tt>Comments</tt> - default: green <tt>Strings</tt> - default: purple <tt>UnterminatedStrings</tt> - default: dark red <tt>SystemCommands</tt> - default: orange <tt>Errors</tt> - default: light red <tt>Hyperlinks</tt> - default: underlined blue <tt>Black</tt>,<tt>Cyan</tt>,<tt>Magenta</tt>,<tt>Blue</tt>,<tt>Green</tt>,<tt>Red</tt>,<tt>Yellow</tt>,<tt>White</tt>
-Blue
is underlined blue, like Hyperlinks
; _Comments
is underlined green etc.*Blue
is bold blue; *Comments
is bold green etc. Note: Matlab does not currently support both bold and underline, only one of them can be used in a single cprintf command. But of course bold and underline can be mixed by using separate commands.STYLE also accepts a regular Matlab RGB vector, that can be underlined and bolded: -[0,1,1] means underlined cyan, *[1,0,0]
is bold red.
STYLE is case-insensitive and accepts unique partial strings just like handle property names.
CPRINTF by itself, without any input parameters, displays a demo
text
, regular black text
); cprintf(hyper
, followed s
,by
); cprintf(key
, d colored
, 4); cprintf(-comment
,& underlined
); cprintf(err
, elements
); cprintf(cyan
, cyan
); cprintf(_green
, underlined green
); cprintf(-[1,0,1], underlined magenta
); cprintf([1,0.5,0],and multi-
line orange
); cprintf(*blue
, and bold (R2011b+ only)
); cprintf(string
); % same as fprintf(string
) and cprintf(text
,string
)-str
,under
^line
); cprintf(err
,red
); % hidden red
, unhidden _
>> cprintf(str
,regu
lar
); cprintf(err
,red
); % underline red (not purple) lar
)-terminated segments display unstyled (black) when the command prompt chevron (>>
) regains focus on the continuation of that line (I can't pinpoint when this happens). To fix this, simply newline-terminate all command-prompt messages.Definition at line 17 of file cprintf.m.
References all().
Referenced by MUnit.RunClassTests(), models.BaseFirstOrderSystem.setConfig(), and approx.BaseApprox.test_ApproxProjections().
function [underlineFlag , boldFlag , style ] = cprintf>processStyleInfo | ( | style | ) |
function cprintf>setElementStyle | ( | docElement, | |
style, | |||
specialFlag, | |||
majorVersion, | |||
minorVersion | |||
) |