MATLAB: Does the option “Starting and ending indices (port)” within the Selector block generate an output filled with NaNs in Simulink 7.4 (R2009b)

simulinkw_author

I would like to extract a small part of a multidimensional signal in Simulink with the selector block. If I use the option "Starting and ending indices (port)" I obtain an output of the same size as the input where the part to be removed has been substituted by NaNs. I was expecting an output signal of reduced dimension.

Best Answer

This is expected behavior. Documentation on the option "Starting and Ending Indices (Port)" is missing from the User's Guide on Simulink 7.4 (R2009b).
Here is current documentation that explains the behavior:
Simulink 7.4 works with variable size signals. If the logged signal data is smaller than the maximum size, values are padded with NaNs or appropriate values. An example of this behavior is discussed in section "Saving variable size signal data" on page: