MATLAB: Howwould you in put this in to math lab with functions

sumsummation

add all elements of vector x=[37294]

Best Answer

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
Related Question