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 this

    function 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 in imshow function) called this

    warning(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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -