For SIMULINK level-1 S function how to address two inputs which are matrices

if the inputs to the S function are two which are matrices
in the first place how to declare them in the function syntax *function [sys,x0,str,ts,simStateCompliance] =multiply(t,x,u,flag,)***
and how to adress the elements of the matrices say if A and B are the input matrices
A(1,1) and B(2,1) something like that..
Please help in this regard Thanks in advance

 採用された回答

Kaustubha Govind
Kaustubha Govind 2013 年 5 月 1 日

0 投票

Since Level-1 MATLAB S-functions only have one input, you'll need to concatenate A and B to supply them as the input. Your indexing will depend on how you concatenate them before supplying them to the S-function.
Also, may I recommend that you try and switch to using Level-2 MATLAB S-functions? Level-1 S-functions have been deprecated for a long time, and have very limited features. Please see Convert Level-1 MATLAB S-Functions to Level-2.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by