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

有帮助吗?

解决方案

Try this:

sum(a(1:end, 2:end)(:))
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top