Simulink への Python コードの統合
Python® コードを使用したアルゴリズムを Simulink® に統合
Simulink では、Python コードを使用して設計されたアルゴリズムを実装できます。Simulink で MATLAB Function ブロック、MATLAB System ブロック、または Python インポーターを使用して Python モジュールを実装できます。単純なアルゴリズムの実装には、MATLAB Function ブロックを使用します。状態ダイナミクスやストリーミング データの処理など、ブロックのカスタマイズが追加で必要なアルゴリズムに対しては、MATLAB System ブロックを使用します。Python インポーターでは、指定された関数に対するカスタム ブロックを生成して Python モジュールを Simulink にインポートできます。
MATLAB® での Python の使用の詳細については、MATLAB からの Python の呼び出しを参照してください。
トピック
- Overview of Integrating Python Code with Simulink
Integrate Python code with Simulink Using MATLAB Function block or MATLAB System block.
- Import Python Code to Simulink Using Python Importer Wizard
Use the Python Importer to Import Python Modules and Packages to Simulink.