How can I calculate the sample mean and sample variance
조회 수: 19 (최근 30일)
이전 댓글 표시
I have a pseudo-random matrics M, sizes K-by-N. How can I calculate the sample mean and sample variance:
1) for each column,
2) for the whole matrix?
댓글 수: 0
채택된 답변
RAGHUNATHRAJU DASHARATHA
2022년 12월 4일
A per my understanding you want to calculate mean and variance for each column and whole matrix.
I'll demonstrate it using below example
a=randi(10,3) % generates pseudo random matrix
%Mean and Variance for each column
[V,M]=var(a)
%Mean and Variance for whole matrix
[b,c]=var(a,0,"all")
for further more go through this link
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!