minimum value and its index
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear all,
If I had 4 vectors each has one number like v1=56.3; v2=40.55; v3=-89.1; v4=74.2. How would I get the minimum value and its index in Simulink? In this case, the minimum is -89.1 and the index is 3.
Many thanks, Nadia
댓글 수: 2
Azzi Abdelmalek
2013년 2월 11일
Why are you calling them vectors? Can you explain how are v1,v2, v3 & v4 imported to simulink?
채택된 답변
the cyclist
2013년 2월 11일
편집: the cyclist
2013년 2월 11일
I don't know if it is the same in Simulink, but in MATLAB you can do this as
[minval,idx] = min([v1,v2,v3,v4])
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!