How to get an Index for the Particular Element in array in simulink
56 次查看(过去 30 天)
显示 更早的评论
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
回答(1 个)
Walter Roberson
2015-9-25
compare http://www.mathworks.com/help/simulink/slref/comparetoconstant.html and send the result to find http://www.mathworks.com/help/simulink/slref/find.html
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!