![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174015/image.png)
How to pick up an 'index number' of a function in Simulink?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
Using Simulink, I made a function 'F=sin(u(1))' where u(1) is time where the fixed time step (0.001) is used.
Then, F(1) = sin(0) = 0, F(2) = sin(0.001) = 9.999998333333417e-04, and so on.
I want to pick up the index number when the function F exceeds 0.5 for the first time, that is,
F(i) > 0.5, i=?
I am wondering how I can implement this in Simulink.
Thank you.
0 个评论
采纳的回答
Zack Peters
2016-4-6
Hi Hancheol,
Here is one example to help get you started. THere's a lot of different ways that you can do this one, I just thought that this would highlight so of our basic blocks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174015/image.png)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!