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

조회 수: 1 (최근 30일)
Bob Li
Bob Li 2011년 12월 29일
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

답변 (1개)

Wayne King
Wayne King 2011년 12월 29일
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
Wayne King
Wayne King 2011년 12월 29일
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 2011년 12월 29일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by