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 Commenti

Are you kidding?
Khawaja Asim
Khawaja Asim il 13 Ago 2011
lol.... yes

Accedi per commentare.

 Risposta accettata

Paulo Silva
Paulo Silva il 13 Ago 2011
doc max

6 Commenti

Khawaja Asim
Khawaja Asim il 13 Ago 2011
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 il 13 Ago 2011
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 il 13 Ago 2011
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 il 13 Ago 2011
DOCSEARCH help to find a function for a specific task:
docsearch max
Khawaja Asim
Khawaja Asim il 13 Ago 2011
thank you dear you have been very helpful to me... :)
Khawaja Asim
Khawaja Asim il 13 Ago 2011
actually i am new user of matlab.. :) i hope i will learn much in just few days.. :)

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by