MATLAB Answers

Index expression out of bounds. Attempted to access element 2. The valid range is 1-1. More information

29 views (last 30 days)
Ahmed Rehan
Ahmed Rehan on 13 Apr 2020
Commented: Ahmed Rehan on 16 Apr 2020
Hi,
I am facing the problem that I have two subsystems (brown and blue in fig.) with common inputs. When I run, I see the error "Index expression out of bounds. Attempted to access element 2. The valid range is 1-1. More information". However, if I just delete either of these subsystems, the other works perfect. But they dont work simultaneously :(.

  0 Comments

Sign in to comment.

Answers (1)

Rajani Mishra
Rajani Mishra on 16 Apr 2020
The error encountered implies that you are trying to access an index greater than one for a variable of size 1*1 that is its having just one element not a vector or matrix. Possibly the subsystem you have deleted has this invalid access to index

  1 Comment

Ahmed Rehan
Ahmed Rehan on 16 Apr 2020
I have tried much to solve the issue in this way, but in vain.. At last, I just made a copy of all the inputs and fed them separately to the other system and it worked.

Sign in to comment.


Translated by