Selecting maximum values from every column in a matrix

1 回表示 (過去 30 日間)
Alexander
Alexander 2013 年 3 月 11 日
コメント済み: Eren Atar 2022 年 6 月 14 日
Hi,
I have a matrix of values and would like to select the highest value in every column and save it into a 1D array. Any help would be appreciated.
Cheers,
Alex

採用された回答

Vishal Rane
Vishal Rane 2013 年 3 月 11 日
編集済み: Vishal Rane 2013 年 3 月 11 日
Assuming
a = [11 2 3; 4 52 6; 7 8 92];
max(a)
gives exactly what you need.
Refer max()
  1 件のコメント
Eren Atar
Eren Atar 2022 年 6 月 14 日
A = rand(24*60*60,1);
B = reshape(A,[],1440) ;
iwant = max(B)
Thank you this should do it

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

タグが未入力です。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by