From: Walter Roberson on
Doug Schwarz wrote:

> To overload display, create display.m and put it in a directory called
> @double which is itself inside a directory on the MATLAB path. (Do not
> put @double on the path.)
>
> You can program display.m to do anything you want, including call the
> built-in display (with builtin('display'...) ), if desired.

To which I will add the brief note that the original poster will likely
find the inputname() function to be useful in this context, to know what
name to put on the left hand side of the '='.