Executing MBC models that have placed in an array

I have created models in MBC Toolbox and exported them to the workspace. I then placed them in an array so that I can pass them as a single argument to a function. The problem is that I don't know how to execute the models after I have placed them in the array. From the command line, the models are executed as such:
r1 = Model1([3000, 50, 0, 14, 400, 30]); r2 = Model2([3000, 50, 0, 14, 400, 30]);
I put the models in the array as follows:
arrModels = [Model1, Model2];
I tried to execute them like this:
r1 = arrModels(1)([3000, 50, 0, 14, 400, 30]);
but that didn't work.
Any ideas?

답변 (0개)

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

질문:

2011년 9월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by