How can I calculate the sample mean and sample variance
35 次查看(过去 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 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!