Calculate Average or Mean of a matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
a=[5 2;5 6;8 8]; How to calculate the average of this matrix using function?
Answer is like (5+5+8/3,2+6+8/3)
댓글 수: 0
채택된 답변
추가 답변 (1개)
Maneet Kaur Bagga
2022년 7월 6일
Hi, Minhaz Parveez
As per my understandig you want to calculate the mean of each coloumn of the matrix. By default MATLAB fuctions work on coloumns therefore you can use the mean function directly. Please refer to the code below. Hope it helps!
X = [5 2;5 6;8 8]
mean(X)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!