Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

MATLAB S-Function のブロック機能の構成

S-Function でのサンプル時間、入力関数および出力関数の実装

MATLAB® S-Function では、さまざまな S-Function API を使用して拡張ブロック機能を構成できます。

  • 入力/出力端子の作成および構成

  • ブロックベースのサンプル時間と端子ベースのサンプル時間の指定

  • DWork ベクトルを使用したメモリの割り当て

  • パラメーターの S-Function への受け渡し

  • 実行時パラメーターの作成

メソッド

すべて展開する

setupSpecify the number of inputs, outputs, states, parameters, and other characteristics of the MATLAB S-function
OutputsCompute the signals that this MATLAB S-function block emits
Terminateシミュレーションの終了時に必須のアクションを実行
CheckParametersCheck the validity of a MATLAB S-Function's parameters
DerivativesCompute a MATLAB S-Function's derivatives
DisableRespond to disabling of an enabled system containing this MATLAB S-Function block
EnableRespond to enabling of an enabled system containing this MATLAB S-Function block
GetOperatingPointReturn operating point for MATLAB S-function as MATLAB data structure
InitializeConditionsInitialize the state vectors of this MATLAB S-function
PostPropagationSetupSpecify the sizes of the work vectors and create the run-time parameters required by this MATLAB S-function
ProcessParametersProcess the MATLAB S-function's parameters
ProjectionPerturb the solver's solution of a system's states to better satisfy time-invariant solution relationships
SetAllowConstantSampleTimeSpecify sample time behavior and tunability for S-function blocks with port-based sample times
SetInputPortComplexSignalSet the numeric types (real, complex, or inherited) of the signals accepted by an input port
SetInputPortDataTypeSet the data types of the signals accepted by an input port
SetInputPortDimensionsSet the dimensions of the signals accepted by an input port
SetInputPortDimensionsModePropagate the dimensions mode
SetInputPortSampleTimeSet the sample time of an input port that inherits its sample time from the port to which it is connected
SetOutputPortComplexSignalSet the numeric types (real, complex, or inherited) of the signals accepted by an output port
SetOutputPortDataTypeSet the data type of the signals emitted by an output port
SetOutputPortDimensionsSet the dimensions of the signals accepted by an output port
SetOutputPortSampleTimeSet the sample time of an output port that inherits its sample time from the port to which it is connected
SetOperatingPointRestore operating point of MATLAB S-function
SimStatusChangeRespond to a pause or resumption of the simulation of the model that contains this MATLAB S-function
StartInitialize the state vectors of this MATLAB S-function
UpdateUpdate a block's states
WriteRTWGenerate code generation data for the MATLAB S-function

クラス

Simulink.BlockPreCompInputPortDataブロックの入力端子に関するコンパイル前の情報を提供
Simulink.BlockPreCompOutputPortDataブロックの出力端子に関するコンパイル前の情報を提供
Simulink.MSFcnRunTimeBlockLevel-2 MATLAB S-Function ブロックに関する実行時の情報を取得する
Simulink.RunTimeBlockシミュレーションの実行中における、Level-2 MATLAB S-Function やその他の MATLAB プログラムによるブロックに関する情報の取得
Simulink.BlockDataブロック パラメーターなど、ブロックに関連するデータの実行時の情報を提供する
Simulink.BlockPortDataブロックの入力端子または出力端子を記述
Simulink.BlockCompDworkDataブロックの Dwork ベクトルに関するコンパイル後の情報を提供する
Simulink.BlockCompInputPortDataブロックの入力端子に関するコンパイル後の情報を提供
Simulink.BlockCompOutputPortDataブロックの出力端子に関するコンパイル後の情報を提供

トピック