Where can I find “Spectrum” class definition file (contain classdef)?

1 view (last 30 days)
Hi,
Where can I find the definition of a built-in class, such as “spectrum”?
I read Object-Oriented Programming R2011b documents and read that there are two basic ways for defining classes:
1. all in a single file
2. in a folder @ClassNameA with the same name as the class.
However, for Spectrum class in Signal Processing Toolbox, although there is a folder:
C:\Program Files\MATLAB\R2008a\toolbox\signal\signal\*@spectrum*
There is no same name spectrum.m file which would contain classdef definition.
Could anyone tell me why? Where can I find the class definition?
Bob

Answers (1)

Wayne King
Wayne King on 29 Dec 2011
Hi Bob, the spectrum objects you refer are "old" objects having been introduced back in MATLAB R14 (Signal Processing Toolbox version 6.2).
They are not MCOS objects utilizing the new standard of OO programming in MATLAB. The keyword classdef to signal the construction of an MCOS class was introduced first in R2008.
Accordingly, you won't be able to find a corresponding classdef for those objects.
  3 Comments
Wayne King
Wayne King on 29 Dec 2011
Enter
>>ver
but what I'm saying is that the spectrum object were introduced back in R14, they are older than the classdef syntax you are thinking about. That is a newer version of MATLAB OO programming. If those spectrum objects were introduced in R2008 (or later), they would have used the classdef
Wayne King
Wayne King on 29 Dec 2011
Bob, just to give a bit more information, the spectrum objects are an example of a UDD object, or a schema object. The class definitions for the schema objects are not like those of the MCOS.
The class definition for the UDD objects are in schema files that you are likely to find p-coded, e.g. schema.p

Sign in to comment.

Categories

Find more on Construct and Work with Object Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!