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 ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by