how to sum every each rows on matrix
1 次查看(过去 30 天)
显示 更早的评论
i have size matrix 5x25, i want to sum every each rows and the output would be 5x1 matrix. how to do that? thanks in advance
0 个评论
采纳的回答
Rik
2022-12-27
编辑:Rik
2022-12-27
You can use the sum function:
data=rand(5,25);
sum(data,2)
1 个评论
Image Analyst
2022-12-27
@Risma Fitriyani To learn other fundamental concepts, invest 2 hours of your time here:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!