When I use the MinMax block in simulink, how can I determine the index of the MinMax value?

조회 수: 4 (최근 30일)
When I use the for loop block in Simulink. I generate an array from the for loop. After that, I apply the min to find the minimum of the array. I would like to know what index is corresponding to this minimum value.

답변 (1개)

Don Zheng
Don Zheng 2017년 6월 8일
Try the Logical Operator block and the Find Nonzero Elements block.
  댓글 수: 1
Ashraf Omran
Ashraf Omran 2017년 6월 8일
Thank you Don. You are using the same way that I am using. I was thinking about a built-in-block in Simulink to do so. For example, when we use y = min(x) we can extended to [y,i]= min(x). I was looking for the same in Simulink. May be in the upcoming version, we will have that option.

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

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by