필터 지우기
필터 지우기

Finding a mean for all my data

조회 수: 1 (최근 30일)
Megan Mirkhanian
Megan Mirkhanian 2018년 11월 28일
편집: Rena Berman 2023년 11월 27일
Hi, How do I find the mean of all the data given in rows and columns.
  댓글 수: 1
Rena Berman
Rena Berman 2023년 11월 27일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

답변 (2개)

madhan ravi
madhan ravi 2018년 11월 28일
mean(datas)
mean(datas,2)

Star Strider
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(:))

카테고리

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