Size of input during Simulink propagation
size = propagatedInputSize(obj,index)
returns, as a vector, the input size of the specified System
size = propagatedInputSize(
index specifies the input for which to return the
size information. (Do not count the
obj in the
index. The first input is always
You can use
propagatedInputSize only from within the
getOutputSizeImpl method in your class definition file. Use
Your System object has more than one input or output.
The input size determines the output size.
The output size must differ from the input size.
For variable-size inputs, the propagated input size from
propagatedInputSize differs depending on the
propagatedInputSize returns the size of the inputs
used when you run the object for the first time.
propagatedInputSize returns the upper bound of the
obj— System object
System object handle used to access properties, states, and methods specific to the object. If
propagatedInputSize method does not use the object, you can replace this
index— Input index
Index of the specified input
size— Input size
Size of the specified input, returned as a vector
Get the size of the second input. If the first
dimension of the second input has a size greater than
then set the output size to a 1 x 2 vector. For all other cases, the
output is a 2 x 1 matrix. Assume that the first input has no impact
on the output size.
methods (Access = protected) function outsize = getOutputSizeImpl(obj) size = propagatedInputSize(obj,2); if size(1) == 1 outsize = [1,2]; else outsize = [2,1]; end end end