Hi Rosario,
This documentation link might be helpful to understand how to write scripts for Simscape-based models and their underlying logic.
Hope this helps!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!