MATLAB: Use S-function s-functionsimulink Hy, I have a script in matlab and need to put it in simulink, but i have dificulties using s-function Have an example? Thank you Best Answer You can use 'Embedded MATLAB Function' block in your model for embedding MATLAB code with simulink. This block is available atSimulink Library browser > User defined functions > 'Embedded MATLAB Function'For help typedoc 'Embedded MATLAB Function'on command window. Related SolutionsMATLAB: Embedded function (Simulink) Drag and drop the "Embedded MATLAB Function" block from library "Simulink","User-Defined Functions" to your model and copy then paste your M-Function.Or drag and drop the "Fcn" block from the same library and put in your M-Function name.All assume that you have or figure out the input/output argument syntax. MATLAB: S-function the source code http://depositfiles.com/files/pmt4tccyyI used a template simfeatures/src/csfunc.cI used an example. Made mex. And then, has created dll in deploytool.Excuse, I do for the first time s-function. Probably, I do something incorrectly :) Related QuestionHow to use solve function in Embedded function block of simulinkS-function ソースコード管理についてIs the FIND function available in the Embedded MATLAB function set in Simulink 7.2 (R2008b)
Best Answer