フィルターのクリア

How to find minimum element from an array.

2 ビュー (過去 30 日間)
priyanka
priyanka 2014 年 11 月 3 日
コメント済み: priyanka 2014 年 11 月 3 日
function to find Minimum element of an element. Ex: There is an array ArrCost , having elements 132 784 94 35 567. I have to find minimum number from it, but Min(ArrCost) is not Working. Is there any another function.
  2 件のコメント
Adam
Adam 2014 年 11 月 3 日
編集済み: Adam 2014 年 11 月 3 日
What do you mean by "not working"?
min
is obviously the function that does what you say so you need to be more specific as to what is not working about it.
>> ArrCost = [132 784 94 35 567]
ArrCost =
132 784 94 35 567
>> min( ArrCost )
ans =
35
priyanka
priyanka 2014 年 11 月 3 日
Index exceeds matrix dimensions.
Error in PrimsAlgo (line 298) min( ArrCost ) This is the error.

サインインしてコメントする。

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 3 日
a=[132 784 94 35 567]
b=min(a)
  5 件のコメント
James Tursa
James Tursa 2014 年 11 月 3 日
What do you get when you type in
which min
priyanka
priyanka 2014 年 11 月 3 日
Its working. Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by