How to know what at iteration is the minimum value occuring?

조회 수: 1 (최근 30일)
DIP
DIP 2017년 4월 25일
댓글: DIP 2017년 4월 25일
Hi All
Suppose I have a matrix A [ 9 8 6 7 8 2 5 9 6 ] . The minimum occurs at the 6th element. What code does one use to find the iteration number or matrix element where the required value is to be seen ?

채택된 답변

KSSV
KSSV 2017년 4월 25일
doc min
A = [ 9 8 6 7 8 2 5 9 6 ] ;
[val,idx] = min(A)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by