Effacer les filtres
Effacer les filtres

howwould you in put this in to math lab with functions

1 vue (au cours des 30 derniers jours)
adriana resendez
adriana resendez le 9 Fév 2015
add all elements of vector x=[37294]

Réponse acceptée

Star Strider
Star Strider le 9 Fév 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

Plus de réponses (1)

Sean de Wolski
Sean de Wolski le 9 Fév 2015

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by