Clear Filters
Clear Filters

How can I use different inport dimensions on different referenced model instances?

1 view (last 30 days)
My problem is easily understandable with a simple example. Consider that the use of referenced models, as well as input / output selections are project musts.
Imagine that I have a referenced model that performs the following task:
  1. Takes a N length vector as input
  2. Finds that maximum value on that vector
  3. Returns that maximum value
I want to introduce two instances of that referenced model in my parent model, in such a way that the first instance analyses a 2-dimensional vector and the second instance a 17 dimensional one.
I have tried unsuccessfully the followings:
  1. To set the inport of the referenced model as -1 (inherit), although I know that port dimensions are not propagated between referenced model and parent model boundaries
  2. To use variable size signals. The problem is that the maximum vector size has to be the same at parent model signal and referenced model inport
Any idea on how to achieve this?

Answers (0)

Categories

Find more on Model References 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!