Crear System objects
Escriba una clase de MATLAB® que cree y defina un nuevo System object™
Para poder definir un System object propio, se deben personalizar los métodos de implementación. Use herramientas gráficas para explorar la extensa API y crear System objects. Por ejemplo, se pueden insertar métodos para inicializar, ejecutar, restablecer y terminar System objects. Para ver una introducción a la definición de un System object, consulte Define Basic System Objects.
Métodos
Funciones
sysobjupdate | Update custom System object to latest syntax |
Clases
matlab.System | Base class for System objects |
matlab.system.mixin.FiniteSource | Finite source mixin class |
matlab.system.display.Action | Custom button |
matlab.system.display.Icon | Custom icon image |
matlab.system.display.Header | Header for System objects properties |
matlab.system.display.SectionGroup | Section group for System objects |
matlab.system.display.Section | Property group section for System objects |
Temas
Introducción a la escritura de System objects
- Define Basic System Objects
Create a basic System object with the
stepImpl
method.
Atributos de propiedad
- Define Property Attributes
Specify property attributes to limit the type, visibility, and value of properties.
Entrada y salida
- Change the Number of Inputs
This example shows how to set the number of inputs for a System object™ with and without usinggetNumInputsImpl
. - Define Composite System Objects
Define System objects that include other System objects as properties. - Handle Input Specification Changes
Implement methods to restrict when System object input complexity, data type, or size can change or implement a method to react when input specifications change.
Rendimiento y eficiencia
- Tips for Defining System Objects
Tips to speed up slow System objects. - Detailed Call Sequence
Call sequence showing the order of methods when you run a System object. - Define Finite Source Objects
This example shows how to define a System object that performs a specific number of steps or specific number of reads from a file. - Save and Load System Object
Use a MATLAB structure to save and load System object properties and state.
Información relacionada
- Personalizar System Objects en Simulink (Simulink)
- System Objects in MATLAB Code Generation (MATLAB Coder)