finding max value in an array

someone please show me a code or function for finding the maximum value in a vector or array...?

댓글 수: 2

Andrei Bobrov
Andrei Bobrov 2011년 8월 13일
Are you kidding?
Khawaja Asim
Khawaja Asim 2011년 8월 13일
lol.... yes

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

 채택된 답변

Paulo Silva
Paulo Silva 2011년 8월 13일

0 개 추천

doc max

댓글 수: 6

Khawaja Asim
Khawaja Asim 2011년 8월 13일
but this dose not show the index corresponding to which we have max value, is there any other source for finding max value that give the index number also...?
Paulo Silva
Paulo Silva 2011년 8월 13일
It's on the documentation, type doc max and read, you find this:
[C,I] = max(A) finds the indices of the maximum values of the array or vector A, and returns them in output vector I. If there are several identical maximum values, the index of the first one found is returned.
Paulo Silva
Paulo Silva 2011년 8월 13일
Please read the MATLAB Documentation, just type the word doc follow by the function you want to use and execute, MATLAB shows you all you need to know about the function and almost every time with good examples on how to use that function.
Jan
Jan 2011년 8월 13일
DOCSEARCH help to find a function for a specific task:
docsearch max
Khawaja Asim
Khawaja Asim 2011년 8월 13일
thank you dear you have been very helpful to me... :)
Khawaja Asim
Khawaja Asim 2011년 8월 13일
actually i am new user of matlab.. :) i hope i will learn much in just few days.. :)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by