Getting mean() to return a vector
이전 댓글 표시
I would like to get the mean of each row in nxn to be returned as a nx1 vector without looping. Is this possible?
Paul
답변 (1개)
KSSV
2017년 4월 22일
2 개 추천
doc mean
it has option of providing dim you want. Let A be your n*n data.
mean(A) computes the mean of each column. mean(A,2) computes the mean of each row.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!