How to get sum of columns even if the matrix is a row vector?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammad Haghighat
am 4 Okt. 2016
Bearbeitet: Matt J
am 4 Okt. 2016
I'd like to get the sum of columns in a matrix, but when the matrix has only one row, the SUM function gives the sum of all elements in the row. How can I skip that? The ideal solution will return the row vector itself.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!