average of each two vectors of a matrix
显示 更早的评论
I have a matrix of n*n for example 10*5
x=rand(10,5)
Then I want to get the average of each two row. For example the first two row (each element ) etc
I will have a matrix of 5*5 after that
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2014-10-9
编辑:Azzi Abdelmalek
2014-10-9
a=reshape(mean(permute(reshape(x',5,2,[]),[2 1 3])),5,5)'
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!