Frage

In Octave, how do I get the sum of all the elements of a matrix a excluding those in the first column?

War es hilfreich?

Lösung

Try this:

sum(a(1:end, 2:end)(:))
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top