How to pick up an 'index number' of a function in Simulink?

조회 수: 1 (최근 30일)
Hancheol Cho
Hancheol Cho 2016년 4월 6일
댓글: Hancheol Cho 2016년 4월 7일
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.

채택된 답변

Zack Peters
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.
  댓글 수: 1
Hancheol Cho
Hancheol Cho 2016년 4월 7일
Thanks, Zack! It really works and is what I wanted to implement. Thank you very much! Hanch

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Verification에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by