Main Content

La traducción de esta página aún no se ha actualizado a la versión más reciente. Haga clic aquí para ver la última versión en inglés.

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

expandir todo

Especificación de entrada

getNumInputsImplNumber of inputs to the System object
isInputDataTypeMutableImplSet whether System object input data type can change
isInputSizeMutableImplSet whether System object input size can change
isInputComplexityMutableImplSet whether System object input complexity can change
isInputDirectFeedthroughImplDirect feedthrough status of input
getInputDimensionConstraintImplDefine input dimension constraints for dataflow subsystems

Especificación de salida

getNumOutputsImplNumber of outputs from System object
getOutputDataTypeImplData types of output ports
getOutputSizeImplSizes of output ports
isOutputComplexImplComplexity of output ports
isOutputFixedSizeImplFixed- or variable-size output ports
getOutputDimensionConstraintImplDefine output dimension constraints for dataflow subsystems

Especificación de estado

getDiscreteStateSpecificationImplDiscrete state size, data type, and complexity
isDiscreteStateSpecificationMutableImplControl whether discrete states can change data type
getDiscreteStateImplDiscrete state property values

Especificación de tiempo de muestreo

getSampleTimeImplSpecify sample time type, offset time, and sample time
allowModelReferenceDiscreteSampleTimeInheritanceImplModel reference sample time inheritance status for discrete sample times

Especificación de interfaz

getGlobalNamesImplGlobal variable names for MATLAB System block
getInterfaceImpl (Simulink)Set System object as message or data
isTunablePropertyDataTypeMutableImplSet whether tunable properties can change data type
isDoneImplEnd-of-data flag
getSimulateUsingImplSpecify value for Simulate using parameter
getSimulinkFunctionNamesImplRegister Simulink function names used in your System object
showFiSettingsImplFixed point data type tab visibility for System objects
supportsMultipleInstanceImplSupport System object in Simulink For Each subsystem
getImpulseResponseLengthImplDefine length of input effects for dataflow subsystems
supports1DVectorsImplEnable MATLAB System block to use 1-D signals for input and output

Cuadro de diálogo y apariencia de bloque

getPropertyGroupsImplProperty groups for System object display
showSimulateUsingImplVisibility of Simulate using parameter
getIconImplName to display as block icon
getHeaderImplHeader for System object display
getInputNamesImplNames of MATLAB System block input ports
getOutputNamesImplNames of MATLAB System block output ports
isInactivePropertyImplStatus of inactive property

Métodos de simulación

setupImplInitialize System object
stepImplSystem output and state update equations
resetImplReset System object states
releaseImplRelease resources
processTunedPropertiesImplAction when tunable properties change
validatePropertiesImplValidate property values of System object
processInputSpecificationChangeImplPerform actions when input size, complexity, or data type change
validateInputsImplValidate inputs to System object
updateImplUpdate object states based on inputs

Clonar, guardar y cargar

loadObjectImplLoad System object from MAT file
saveObjectImplSave System object in MAT file

Ayuda

infoImplInformation about System object

Funciones para implementar métodos de creación

setPropertiesSet property values using name-value pairs when creating System object
propagatedInputComplexityComplexity of input during Simulink propagation
propagatedInputDataTypeData type of input during Simulink propagation
propagatedInputFixedSizeFixed-size status of input during Simulink propagation
propagatedInputSizeSize of input during Simulink propagation
createSampleTimeCreate sample time specification object
getSampleTimeQuery sample time
getCurrentTimeCurrent simulation time in MATLAB System block
setNumTicksUntilNextHit (Simulink)Set the number of ticks in Simulink sample time
displayScalarObjectDisplay format for scalar objects
getHeaderBuild customized display header text
getFooterBuild and return display footer text

Métodos para implementar System objects

narginNumber of input arguments for System object
nargoutNumber of output arguments for System object
getNumInputsNumber of inputs required to call the System object
getNumOutputsNumber of outputs from calling the System object
setupOne-time set up tasks for System objects
resetReset internal states of System object
stepEjecutar el algoritmo System object
releaseRelease resources and allow changes to System object property values and input characteristics
cloneCreate duplicate System object
isDoneEnd-of-data status
isLockedDetermine if System object is in use

Funciones

sysobjupdateUpdate custom System object to latest syntax

Clases

matlab.SystemBase class for System objects
matlab.system.mixin.FiniteSourceFinite source mixin class
matlab.system.display.ActionCustom button
matlab.system.display.IconCustom icon image
matlab.system.display.HeaderHeader for System objects properties
matlab.system.display.SectionGroupSection group for System objects
matlab.system.display.SectionProperty group section for System objects

Temas

Entrada y salida

Rendimiento y eficiencia

Información relacionada