Hi, How do I find the mean of all the data given in rows and columns.

답변 (2개)

Star Strider
Star Strider 2018년 11월 28일

0 개 추천

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에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2018년 11월 28일

편집:

2023년 11월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by