howwould you in put this in to math lab with functions
1 次查看(过去 30 天)
显示 更早的评论
add all elements of vector x=[37294]
0 个评论
采纳的回答
Star Strider
2015-2-9
Assuming you intended to put spaces or commas between the numbers, use the sum function:
x=[3,7,2,9,4];
sum_x = sum(x)
produces:
sum_x =
25
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 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!