Finding the mean of my entire data
조회 수: 4 (최근 30일)
이전 댓글 표시
How do I find the entire mean of all my data points
댓글 수: 1
Luna
2018년 11월 28일
Could you please be more specific about what you needed and how is your data structure?
답변 (3개)
Luna
2018년 11월 28일
편집: Luna
2018년 11월 28일
You can not put file name into mean function.
Please put variable name which exist in your workspace after loading your data.
mean(variableName)
You haven't included your workspace in that screenshot so I don't see anything.
for example create a 5x5 matrix A and take mean value. Mean works with columns.
A = magic(5)
mean(A)
댓글 수: 0
Star Strider
2018년 11월 28일
If you have R2018b, use the 'all' argument:
Avg = mean(MyMatrix, 'all')
otherwise, convert it to a column vector and take the mean of that:
Avg = mean(MyMatrix(:))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!