示例类实现
展示编程模式与方法的 MATLAB® 类
了解类设计和实现的各种工作流及方法。
MATLAB 语言语法
classdef | 类定义关键字 |
主题
- 创建简单类
此简单类介绍用来定义类的基本模式和语法。
- Using a Class to Display Graphics
This example of a MATLAB class definition shows syntax and programming techniques used in typical classes.
- 开发协同工作的类
类可以实现面向对象的设计。
- 用类表示结构化数据
您可以使用类来定义专用数据结构体。
- 通过类实现链表
您可以使用 MATLAB 句柄对象来实现高效的链接列表数据结构。
- Customize Parentheses Indexing for Mapping Class
This example shows how to customize parentheses indexing for a mapping class.
- Representing Polynomials with Classes
This example shows how to define new data types using classes.
- A Class Hierarchy for Heterogeneous Arrays
Heterogeneous class hierarchies enable you to form arrays of different, but related classes.
- 静态数据
静态数据是指类的所有对象共享的数据,您可以在创建类实例后修改这些数据。MATLAB 支持多种处理静态数据的方法。