Executing MBC models that have placed in an array

1 view (last 30 days)
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?

Answers (0)

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!