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 comentarios

Andrei Bobrov
Andrei Bobrov el 13 de Ag. de 2011
Are you kidding?
Khawaja Asim
Khawaja Asim el 13 de Ag. de 2011
lol.... yes

Iniciar sesión para comentar.

 Respuesta aceptada

Paulo Silva
Paulo Silva el 13 de Ag. de 2011

0 votos

doc max

6 comentarios

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by