Domanda

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

È stato utile?

Soluzione

Try this:

sum(a(1:end, 2:end)(:))
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top