이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
서브클래스 응용 예
내장 클래스 서브클래스화 및 인터페이스 정의
내장 클래스에서 클래스를 파생하여, 데이터의 특정 클래스에 대해 수행할 수 있는 연산을 확장하는 특화된 데이터형을 정의합니다. 서브클래스는 내장 클래스 메서드와 동작을 상속하며, 새 메서드를 추가하여 특화된 연산을 수행할 수 있습니다.
도움말 항목
이종 클래스 계층 구조
- A Class Hierarchy for Heterogeneous Arrays
Heterogeneous class hierarchies enable you to form arrays of different, but related classes.
내장된 데이터형의 서브클래스
- Subclasses of MATLAB Built-In Types
Extend MATLAB® built-in classes by deriving from these fundamental data types. - Behavior of Inherited Built-In Methods
Subclass built-in classes to extend the behavior of functions that operate on that type of data. - 클래스에 size 및 numel 사용
size
함수와numel
함수는 사용자 정의 클래스에서 동작합니다.
내장된 클래스에서 파생된 예제 클래스
- Subclasses of Built-In Types Without Properties
Class can derive from a built-in class without defining properties and new behaviors. - Subclasses of Built-In Types with Properties
Classes that derive from built-in classes and define properties must define array behaviors for those classes. - Enumerations Derived from Built-In Classes
Enumeration classes derived from built-in types inherit behaviors from these types.
슈퍼클래스
- 추상 클래스 및 클래스 멤버
추상 클래스를 사용하여 각 서브클래스가 상속하는 인터페이스를 정의할 수 있습니다. - 인터페이스 슈퍼클래스 정의하기
서브클래스가 구현할 인터페이스를 정의하는 방법입니다.