Hi,
You can put your code(another program) in a matlab function block with the input and outputs as per your need. This will bring everything in Simulink.
Hope this helps
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!