Sum Matrix excluding certain values

5 ビュー (過去 30 日間)
Li Chng
Li Chng 2019 年 12 月 4 日
回答済み: Adam Danz 2019 年 12 月 4 日
MatrixA = [1:10 ; 21:30 ; 8:17]
how to sum all the elements inside matrix A, if the element is greater than 3?

採用された回答

Adam Danz
Adam Danz 2019 年 12 月 4 日
y = sum(MatrixA(MatrixA > 3))

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by