Azzera filtri
Azzera filtri

sum of each column of matrix

1 visualizzazione (ultimi 30 giorni)
Berbia
Berbia il 8 Gen 2013
I need to create a vector from a matrix by adding each column elements to form a corresponding vector component. matrix columns are fixed dimension 200. My result should be a row vector of dimension 200. How to do it simply in matlab??

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 8 Gen 2013
Modificato: Azzi Abdelmalek il 8 Gen 2013
A=rand(300,200);
out=sum(A)

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by