I need to write a Level-2 MATLAB S-Function where the input and/or output dimensions are unknown, and might also change during simulation.
Specifically, I would like to implement the two following scenarios:
A) Input: 1-D array of unknown fixed size. Two outputs: sorted array, and sum of all the elements.
B) Same as A), but the size of the array might vary during simulation.
How can I achieve this?
Best Answer