How to get an Index for the Particular Element in array in simulink

56 views (last 30 days)
Greetings All, I am fairly new with Simulink, I am looking for the following, I have a 1D array [1, 9, 3, 2, 5, 8, 9] and i want to find the index of the value i am looking for for eg if i am looking for 9 i shall get 1 as answer and if i am looking for 8 i shall get 5 as answer, is there some block which can perform such operation, if not what will be the most efficient way to achieve this.
Regards Harjeet

Answers (1)

Walter Roberson
Walter Roberson on 25 Sep 2015
  1 Comment
Harjeet Singh
Harjeet Singh on 25 Sep 2015
Not Working The Find Block is giving Error, already Tried it, can you present any Working example. I make it like this but i know this can be poor programming.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!