Convert function to Simulink block

stanigator picture stanigator · Feb 8, 2010 · Viewed 19.2k times · Source

How do I convert from a function, that I have written as an m-file, into a block in a Simulink model?

Answer

Edric picture Edric · Dec 7, 2012

There's a video here that shows some options. Basically, use the MATLAB Function block. Or, if you want to keep the code separate (and don't care about code generation), you can use the MATLAB Interpreted Function block.