how to sum every each rows on matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
i have size matrix 5x25, i want to sum every each rows and the output would be 5x1 matrix. how to do that? thanks in advance
댓글 수: 0
채택된 답변
Rik
2022년 12월 27일
편집: Rik
2022년 12월 27일
You can use the sum function:
data=rand(5,25);
sum(data,2)
댓글 수: 1
Image Analyst
2022년 12월 27일
@Risma Fitriyani To learn other fundamental concepts, invest 2 hours of your time here:
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!