How to remove mean from matrix values?
6 次查看(过去 30 天)
显示 更早的评论
Hi all. I have M(80x200) matrix. I found mean A=mean(M) for every column so I have A(1x200) matrix. Now I want to subtract means from each values on every columns.
I guess if I turn A matrix into (80x200) then I can M-A
0 个评论
采纳的回答
Geoff Hayes
2016-5-14
jack - you can use a for loop to subtract the mean matrix A from each row of M. Something like
for k=1:80
M(k,:) = M(k,:) - A;
end
M = M - repmat(A,80,1);
Try either of the above and see what happens!
更多回答(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!