Main Content

创建MATLAB S功能

使用2级MATLAB创建自定义块®S功能

MATLAB S功能API使用户可以使用MATLAB语言创建具有处理多个输入和输出端口的能力以及Simulink产生的信号的能力金宝app®模型,包括任何数据类型的矩阵和框架信号。

S功能 在模型中包括s功能

Methods

展开全部

设置 Specify the number of inputs, outputs, states, parameters, and other characteristics of the MATLAB S-function
输出 计算此MATLAB S功能块发出的信号
终止 在终止模拟时执行任何行动
CheckParameters 检查MATLAB S功能参数的有效性
衍生物 计算MATLAB S功能的衍生物
禁用 响应包含此MATLAB S功能块的启用系统的禁用
使能够 响应启用包含此MATLAB S功能块的启用系统
GetOperatingPoint Return MATLAB S-function's simulation operating point as aMATLAB数据结构
初始化 初始化此MATLAB S功能的状态向量
PostpropagationsEtup 指定工作向量的尺寸,并创建此MATLAB S功能所需的运行时参数
ProcessParameters 处理MATLAB S功能的参数
投影 Perturb the solver's solution of a system's states to better satisfy time-invariant solution relationships
SetAllowConstantSampletime 指定具有基于端口样本时间的S功能块的样本时间行为和可调性
setInputportComplexSignal 设置数字类型(真实、复杂或继承) of the signals accepted by an input port
SetInputPortDataType 设置输入端口接受的信号的数据类型
setInputPortDimensions 设置输入端口接受的信号的尺寸
setInputPortDimensionsMode 传播尺寸模式
setInputportSampletime 设置输入端口的样品时间,该输入端口继承了其相互连接的端口的样品时间
setOutputputportComplexSignal 设置输出端口接受的信号的数字类型(真实,复杂或继承)
SetOutputPotportDataType Set the data type of the signals emitted by an output port
setOutputpotportDimensions Set the dimensions of the signals accepted by an output port
setOutputpotportsampletime 设置输出端口的样本时间,该输出端口从其连接的端口继承其样品时间
SetOperatingPoint 恢复MATLAB S功能的操作点
Simstatuschange 响应暂停或恢复模型的模拟,其中包含此MATLAB S功能
开始 初始化此MATLAB S功能的状态向量
Update 更新块的状态
WriteRTW 生成MATLAB S功能的代码生成数据

课程

金宝appsimulink.msfcnruntimeblock Get run-time information about Level-2MATLABS功能块
金宝appsimulink.runtimeblock Allow Level-2MATLABS功能和其他MATLAB在运行模拟时获取有关块的信息的程序
Simulink.BlockData 提供有关块相关数据的运行时间信息,例如块参数
金宝appsimulink.blockportdata 描述块输入或输出端口
Simulink.BlockCompDworkData 提供有关Block Dwork矢量的填充信息
金宝appsimulink.blockcompinputportdata 提供有关块输入端口的填充信息
Simulink.BlockCompOutputPortData 提供有关块输出端口的填充信息
Simulink.BlockPreCompInputPortData 提供有关块输入端口的预编译信息
Simulink.BlockPreCompOutputPortData 提供有关块输出端口的预编译信息

话题

  • 写2级MATLAB S命令

    Explains how to create MATLAB S-functions based on the current Level-2 MATLAB S-function application programming interface (API).

  • S功能示例

    创建各种类型的S功能和S功能。