How to sum a specific number of observations through an entire dataset ?
1 次查看(过去 30 天)
显示 更早的评论
Sir i have a dataset (say m(750,1)). I have to sum 75 observations from beginning . Means i need sum of 1-75, 76-150, 151-225 ....676-750 observations so that i get the result as m_result(10,1). Would you please help me?
0 个评论
采纳的回答
Mischa Kim
2014-5-17
TRAILOKYA, if it is a numeric array use reshape
m_result = sum(reshape(m,75,[]));
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!