سؤال

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