Simulink function block using inputs of varying dimensions
Afficher commentaires plus anciens
I am trying to find out what the best approach is for implementing a user-defined (multi-input, multi-output) function, say, 'foo', in a Simulink block that accomodates for the following:
1.) The dimensions of the signals are not known when creating the Simulink model.
2.) Some inputs are 2-dimensional, and I would prefer not reshape them into a 1-D vector.
3.) The function calls other user-defined functions.
It is my understanding that Interpreted MATLAB Function blocks, as well as fcn blocks, can only have 1 input port (although it is possible to separate the elements of the signal into the separate inputs required for 'foo'), and therefore concatenating multiple signals into one before being passed into the block is necessary. This is troublesome for me because of requirements 1 and 2. It is also my understanding that MATLAB Function blocks are only able to call a subset of MATLAB functions and not user-defined functions, and therefore does not meet requirement 3.
What would be the best solution (block) for this problem?
Réponses (0)
Catégories
En savoir plus sur Sources dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!