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
@charsomewhere in path function in there thisfunction varargout = warning(varargin) fprintf('\033[33m'): [varargout{1:nargout}] = builtin('warning',varargin{:}); fprintf('\033[0m'); endi tried not use directly
warningfunction because have infinite loop. problem warnings (for example inimshowfunction) called thiswarning(message('images:imshow:magnificationmustbefitfordockedfigure'))and doesn't call function in
@charfolder.i thought of creating program call matlab , color when founds warnings or errors (or call matlab intelligent shell command coloring lines
warningappears 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