how to find the mininmum value in a double vector ?
조회 수: 2 (최근 30일)
이전 댓글 표시
hello every one
I have vector with double values and I want to determine the smallest value as well as irs index
vecto=[ 2.6660 2.2852 10.0000 3.2617 10.0000 10.0000 9.8532]
I use min(vecto)
but it doesn't work
any solution to this problem
mplease help me!
Thank you
댓글 수: 1
답변 (1개)
Awais Saeed
2021년 11월 28일
You are half way there. Use
[value, index] = min(vector)
댓글 수: 1
Image Analyst
2021년 11월 29일
I talked about how that is not the most general or robust way to do it in my answer to his duplicate question:
However it will work as long as you know in advance that the min occurs only once and no more.
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!