how to sum elements of a cell array

15 次查看(过去 30 天)
I have a cell array V={[1;2;3;4],[5;6;7;8]}, I want to do a summation as follows [1+5;2+6;3+7;4+8]. I need the result to be in a matrix. Thank you

采纳的回答

madhan ravi
madhan ravi 2019-8-14
sum(cat(3,V{:}),3)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by