MATLAB Answers

Simulink Selector Block: "Invalid parameter 'Indices' specified"

6 views (last 30 days)
Rafael Cordero
Rafael Cordero on 17 Oct 2020
Hello all,
I'm getting an error on Simulink regarding the selector block.
My circuit looks like this:
Its a Matlab function block -> Selector block -> Interpreted Matlab function block
The output of the first block (the Matlab function block) is variable length. This length depeds on a global constant (defined in the Matlab workspace) as fs (fs normally = 1000).
Before I can pass the output of the first block to the interpreted Matlab function block (which does not like variable-length signals), I'm trying to use a selector block (the middle one) to essentially fix the length so it's no longer variable. It's kinda redundant because I'm essentially selecting ALL the elements of the selector input, but in such a way that the output is no longer variable-size.
I've setup the selector parameters to the following:
This gives the following error when I run it:
  • Invalid parameter 'Indices' specified in '.../Selector Block' for dimension 2. This parameter must be in the range 1 through 1
I don't understand why dimension 2 must be in the range 1 to 1. Further, if I do what it says (it wont do what I want it to but just for argument's sake), it then gives me the same error but for dimension 1, so that it only runs if the output is dimension 1x1.
I've tried to work around this isse but to no avail.
Any ideas why I'm getting this error and how I can circumvent it/address it?
Thank you.

Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!