Is it possible to assign the size of an input port to variables instead of fixed constants?

2 visualizzazioni (ultimi 30 giorni)
I am using an input port in a Simulink model that will be compiled and I need to set the starting size of the input port in order to compile the model without errors.
An array of size (i x j) is used as the input to the model, where i = rows and j = columns. i and j change values each time the compiled model is called but the values are known prior to the model being called.
Is it possible to define the size of the input port as (i x j) and assign values to these variables each time the model is called? My idea at the moment is to use two additional inputs to define the size of the rows and columns but I don't know how (or if) these can be used to size the orignal input port.

Risposta accettata

Mark McBroom
Mark McBroom il 27 Ott 2023

Più risposte (0)

Categorie

Scopri di più su Event Functions in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by