Attempting to use the selector block in simulink with the following settings:
- number of input dimension: 2
- index option 1: select all
- index option 2: index vector (port)
My goal here is to be able to pick off columns from a matrix. If for example, I attempt to select column 1 via the index vector port, it works just fine so long as the matrix has more than one column. However, if there is only one column, the selector block returns element (1,1) instead of the entire column.
Is there a way to make this work how I'd like? It should be the equivalent of M(:,idx), but is not. I think it's attempting to be intelligent about the fact that I'm using a selector block on a [nx1] matrix and use the index value for the rows. But really in this case, I'd want to have the whole column returned.
And yes, I realize this would be an empty step, essentially returning the same as the input, however due to the nature of the code, the size of the matrix is undetermined until initialization. So I need the option to pick out a column from a matrix, whether there is only 1 column, or 50.