Hi Maryam,
You can use Simulink.CodeImporter class to import custom C++ code into Simulink for modeling, verification, and validation. To read about it, refer to the following MathWorks documentation:
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!