Question

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

Was it helpful?

Solution

Try this:

sum(a(1:end, 2:end)(:))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top