howwould you in put this in to math lab with functions

1 次查看(过去 30 天)
add all elements of vector x=[37294]

采纳的回答

Star Strider
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

更多回答(1 个)

Sean de Wolski
Sean de Wolski 2015-2-9

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by