Borrar filtros
Borrar filtros

howwould you in put this in to math lab with functions

1 visualización (últimos 30 días)
add all elements of vector x=[37294]

Respuesta aceptada

Star Strider
Star Strider el 9 de Feb. de 2015
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

Más respuestas (1)

Sean de Wolski
Sean de Wolski el 9 de Feb. de 2015

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by