access nth element from an array in simulink
    20 views (last 30 days)
  
       Show older comments
    
    Bhargav Jha
 on 10 Aug 2015
  
    
    
    
    
    Commented: Bhargav Jha
 on 11 Aug 2015
            I have a 2D-array of positions imported from workspace. I want to increment the count to access the next element from array once a robot has reached this position. But I am unable to do so on simulink as the data that is imported is a timeseries and it continuously changes as simulation is progressing. Any help would be appreciated.
Thank you.
0 Comments
Accepted Answer
  Sebastian Castro
    
 on 10 Aug 2015
        One of its configurations is that the selection index can be passed in via an input port. To do this, you change the Index Option (for the dimension you want) to Index vector (port) . This way, you can increment your counter outside and change the index as you need to.
- Sebastian
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
