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 Exchange에서 Creating 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