Hi Jitendra
You can refer to following MATLAB documentations to integrate C or C++ code to create S-functions
- https://www.mathworks.com/help/simulink/slref/sfunctionbuilder.html
- https://www.mathworks.com/help/simulink/create-cc-s-functions.html
- https://www.mathworks.com/help/simulink/s-function-builder_mw_04a1b631-c9e0-4236-9eb5-e091b68ead09.html
Thanks