|
"Simon Preston" <preston.simon+mathsworks@gmail.com> wrote in message <hcsdbi$j1m$1@fred.mathworks.com>...
> Hi all,
>
> I'm starting out with object-oriented programming and have a couple of questions:
>
> i) Methods defined in a classdef declaration are not seen by the 'tab completion' in the command window. Is there a way to get tab completion to 'see' these methods?
>
> ii) I am having trouble overloading the 'plot' function. I have define a function called 'plot' under methods but I get the message 'Conversion to double from xxx is not possible' when I try to call it. If I change the name to something other than 'plot' it works fine. What am I doing wrong?
>
> Thanks for any help.
>
With release of Matlab do you use? Both work as documented with R2008a.
i) An instance (object) must exist in the current workspace. Don't forget the dot (e.g. name.) otherwise Matlab looks for a function on the HD, ...
ii) ??? does "methods( myobj )" show the string "plot"? Is the method, plot, public?
/ per
|