Prev: Where to find a United States map with digital boundaries
Next: m-script, Bus Selectro, change the number of Output
From: Mario Pezzoni on 8 Mar 2010 09:13 Hi, I'm trying to subclass wptree from Wavelets toolbox. If I define the class like this: classdef rdtree < wptree ..... end The following error appears: ??? Error using ==> rdtree The specified super-class 'wptree' contains a parse error or cannot be found on MATLAB's search path, possibly shadowed by another file with the same name. Why? Thank you, Mario
From: Steven Lord on 8 Mar 2010 09:51 "Mario Pezzoni" <pezzoni.mario(a)gmail.com> wrote in message news:hn30m5$ajq$1(a)fred.mathworks.com... > Hi, > I'm trying to subclass wptree from Wavelets toolbox. > If I define the class like this: > > classdef rdtree < wptree > .... > end > > The following error appears: > > ??? Error using ==> rdtree > The specified super-class 'wptree' contains a parse error or cannot be > found on MATLAB's search path, > possibly shadowed by another file with the same name. > > Why? The WPTREE class is not defined in a CLASSDEF file. It uses the old class definition syntax, and so cannot be subclassed by a classdef-style class. http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brqzfth-1.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Matt J on 8 Mar 2010 10:25 "Steven Lord" <slord(a)mathworks.com> wrote in message <hn32t5$46c$1(a)fred.mathworks.com>... > > The WPTREE class is not defined in a CLASSDEF file. It uses the old class > definition syntax, and so cannot be subclassed by a classdef-style class. > > http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brqzfth-1.html ================== Obviously, this rule excludes built-in classes for some reason, e.g., @double.
From: Steven Lord on 8 Mar 2010 10:34 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message news:hn34t2$ep1$1(a)fred.mathworks.com... > "Steven Lord" <slord(a)mathworks.com> wrote in message > <hn32t5$46c$1(a)fred.mathworks.com>... > >> >> The WPTREE class is not defined in a CLASSDEF file. It uses the old >> class definition syntax, and so cannot be subclassed by a classdef-style >> class. >> >> http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brqzfth-1.html > ================== > > Obviously, this rule excludes built-in classes for some reason, e.g., > @double. Yes, the built-in classes are an exception. A CLASSDEF class can only subclass other CLASSDEF classes or (most of) the built-in data types: http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brgze9_-1.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Mario Pezzoni on 9 Mar 2010 05:42
"Steven Lord" <slord(a)mathworks.com> wrote in message <hn35es$kvp$1(a)fred.mathworks.com>... > > "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message > news:hn34t2$ep1$1(a)fred.mathworks.com... > > "Steven Lord" <slord(a)mathworks.com> wrote in message > > <hn32t5$46c$1(a)fred.mathworks.com>... > > > >> > >> The WPTREE class is not defined in a CLASSDEF file. It uses the old > >> class definition syntax, and so cannot be subclassed by a classdef-style > >> class. > >> > >> http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brqzfth-1.html > > ================== > > > > Obviously, this rule excludes built-in classes for some reason, e.g., > > @double. > > Yes, the built-in classes are an exception. A CLASSDEF class can only > subclass other CLASSDEF classes or (most of) the built-in data types: > > http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/brgze9_-1.html > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > Thank you for your replay. So there are two incompatible methods to define classes and wavelet toolbox classes belong to the old method. I need to overload a specific method , defaninf in wptree as suggested in http://www.mathworks.com/access/helpdesk/help/toolbox/wavelet/apxb_ob5.html. I create a directory @rdtree, inside i put rdtree.m as the constructor and a defaninf.m to overload the method. Is this the correct way to overload the method in the old way? Thank you, Mario |