Sum Matrix excluding certain values

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 日

1 投票

y = sum(MatrixA(MatrixA > 3))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2019 年 12 月 4 日

回答済み:

2019 年 12 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by