Hi,
I think I am getting confused with all the products capabilities and which to use.
I would like to create a custom function in a simulink model that calculates a checksum amongst other things. Code is auto generated from the model to run on an arm microcontroller.
Preferably I would like to reuse this function across the model and maybe in futre in other models. What would be the best approach for this?
- Integrate C Code Using the MATLAB Function Block
- Create a wrapper around a .c file to create an S-function <not sure if this is even correct?
- Create a Matlab function to do this (what does the generated code look like, is it ok to do this?)
- Use simulink blocks to do this?
Thanks.
Best Answer