필터 지우기
필터 지우기

to find position of min value

조회 수: 1 (최근 30일)
Parul
Parul 2013년 9월 9일
i have sm array, i calculate minimum value of this array, now i want to know, the position of this minimum value in existing array. pls help

채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 9월 9일
A - your array;
[v1,ii] = min(A);
[v2,jj] = min(v1);
out = [v2,ii(jj),jj];
or
[v3,ij] = min(A(:));
[i1,j1] = ind2sub(size(A),ij);
out = [v3,i1,j1];

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 9월 9일
편집: Jan 2013년 9월 9일
@Parul: Read the documentation for min()
  댓글 수: 1
Jan
Jan 2013년 9월 9일
Searching in the forum would reveal several similar discussions also.

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

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by