필터 지우기
필터 지우기

how i can sum the lines of a matrix?

조회 수: 4 (최근 30일)
george
george 2012년 7월 29일
p.x
1 4 5 2 1 ...
3 1 9 3 2 ...
=
4 5 14 5 3
but with out knowing the number of lines or the number of rows
thanks

채택된 답변

E K
E K 2012년 7월 29일
if a is a x-by-y matrix
b=sum(a) will give you a new b matrix which will be 1-by-y matrix which will have the summation of each column.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by