matrices

Dmitri A. Sergatskov dasergatskov at gmail.com
Mon Jun 1 17:40:16 CDT 2009


On Mon, Jun 1, 2009 at 5:21 PM, Carlo Rossi <serosole at yahoo.it> wrote:
> Hello,
>  I have a matrix A and I need to do it:
>
> sum1 = SUM_of_all_element_on_diagonal

sum1 = trace(A)

> sum2 = sum_ofAllElemetNonOn_theDiagonal;
>

sum2 = sum(sum(A)) - sum1

> is it possible to do it in a compact way? thanks
>

Dmitri.



More information about the Help-octave mailing list