Row with means of each column in matrix

조회 수: 1 (최근 30일)
RP
RP 2019년 8월 25일
답변: Bruno Luong 2019년 8월 25일
I have a matrix with data and would like to add one last row that contains the means of each column. Sounds easy enough but I have not been able to figure out how to do it, every time I try I just get one overall mean of all the numbers. I hope someone can help - thank you in advance!

답변 (1개)

Bruno Luong
Bruno Luong 2019년 8월 25일
A = [A; mean(A,1)]

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by