Finding a mean for all my data
이전 댓글 표시
Hi, How do I find the mean of all the data given in rows and columns.
댓글 수: 1
Rena Berman
2023년 11월 27일
(Answers Dev) Restored edit
답변 (2개)
madhan ravi
2018년 11월 28일
mean(datas)
mean(datas,2)
Star Strider
2018년 11월 28일
If you have a recent MATLAB release (definitely R2018b, possibly earlier), use the 'all' argument:
matrix = rand(5,7)
Avg = mean(matrix, 'all')
otherwise, convert it to a column vector first:
Avg = mean(matrix(:))
카테고리
도움말 센터 및 File Exchange에서 Numbers and Precision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!