Matlab/Simulink files

From OpenMBD
Revision as of 09:47, 28 February 2019 by Hugo (talk | contribs) (Created page with "Creating a custom S-function block requires that four files are added to the MatLAB/Simulink project.<br> *'''sfcn_<name>.m''': A function written in MatLAB code describing th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating a custom S-function block requires that four files are added to the MatLAB/Simulink project.

  • sfcn_<name>.m: A function written in MatLAB code describing the S-function block's basic characteristics, such as the number of input ports and the umber of dialog parameters.
  • sfcn_<name>_chk.m: A function written in MatLAB code for checking prerequisites of using the block, such as that only a single block might be present in the model.
  • sfcn_<name>_mcb.m: A function written in MatLAB code that is used for setting up the block's customized parameters. This arguments of the function are the actual parameters. The return value is an human readable information string.
  • sfcn_<name>.tlc: A function written in both MatLAB code and C-code, that can be seen as a transfer layer between the block's settings, input ports, output ports and the C-code.