Decoupling Matlab algorithm from a Simulink model

Suppose I have an algorithm that is written in a several matlab function (with supported rtw functions) such that I have several versions of the same algorithm. for example: my_algo_v0.m my_algo_v1.m my_algo_v2.m ... where *_v#.m having the same inputs and outputs such that it can be implemented as an embedded-function in simulink.
Next, I want to embed all versions of the algorithm in a single Simulink model without creating a different model for each file.
What is the best known way of doing this? In other words, how can I use one model with a different algorithm realizations?
Thanks

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 2월 20일

0 개 추천

Perhaps you can use a Configurable Subsystem with several possible MATLAB Function blocks as the options for the block configuration?

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by