Matlab -nodesktop and ANSI colors on warning and errors -
i have habit use matlab -nodesktop
option, , wondering if possible print warnings , errors in colors. ` moment, tried few things
- i tried change matlab function in
warning.m
, functions built-in , can't modify them i tried follow this post , had create folder
@char
somewhere in path function in there thisfunction varargout = warning(varargin) fprintf('\033[33m'): [varargout{1:nargout}] = builtin('warning',varargin{:}); fprintf('\033[0m'); end
i tried not use directly
warning
function because have infinite loop. problem warnings (for example inimshow
function) called thiswarning(message('images:imshow:magnificationmustbefitfordockedfigure'))
and doesn't call function in
@char
folder.i thought of creating program call matlab , color when founds warnings or errors (or call matlab intelligent shell command coloring lines
warning
appears seems difficult).
does have idea of how solve problem ?
you'll need override warning function @message class. see happens when run:
metaclass(message('images:imshow:magnificationmustbefitfordockedfigure'))
Comments
Post a Comment