필터 지우기
필터 지우기

Find the position of a minimum inside an array

조회 수: 3 (최근 30일)
luca
luca 2019년 8월 5일
답변: madhan ravi 2019년 8월 5일
Given the following vector
V= [100 200 390 180 500 600 788 30 900 450 670 540 340 670 540 609 340 540 650 450 ]
I want to find the position of the minimum value inside V
If I use
A=min (V)
I obtain just
A=30
But what I want is the position inside the vector.
So
8
because the minimum 30 in the 8th position.
May someone help me?

채택된 답변

madhan ravi
madhan ravi 2019년 8월 5일
[Value,Position] = min(V)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by