MATLAB: Transform a S-function into a Simulink block

m-fileMATLABmatlab functions-functionsimulink

Hi,
There is a way to transform a S-function or a Matlab script for Interpreted MATLAB Fcn block into a custom simulink block without carrying m-files and mdl files?
I need to use a single file as model.

Best Answer

The only way to create a custom Simulink block without having to carry additional MATLAB or C-MEX S-function files is to create your block using other Simulink library blocks, grouped as a subsystem.