How to limit operating element size of array in Simulink

2 views (last 30 days)
Hi,
I am trying to make a reference Simulink model for different projects.
One of difference between each pjoject is operating size of array.
eg. Project A : using 12 elements(Max) / Project B : using 10 elements / Project C: 8 elements....
I want to change the operating range for each project with max(12) array on reference model, to optimize operating speed.
How can I change the operating element size of array with parameter?
I want to avoid changing array size for each project for compatibility with other modules.
Thank you in advance.

Accepted Answer

Jonas
Jonas on 26 Mar 2020
The difficulty with referenced models is that they should be reusable inside other models with the exact same input and output interface. That's why it is not possible to simply connect an array of 10 elements when the referenced model expects 12.
I would try to fix the input of that array to the largest it can possibly be (12 elements) and then make sure your model can cope with the fact that for another project you provide it 10 elements + two zero's.
  1 Comment
INSUB MOON
INSUB MOON on 26 Mar 2020
Thanks your comments, I'd better looking for not calculation with zero values to reduce operating time.

Sign in to comment.

More Answers (0)

Categories

Find more on Create Large-Scale Model Components in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!