Compute only diagonals in matrix product in octave?

The first element in the diagonal is the scalar product of the first row of A with the first column of B. The second element in the diagonal is the scalar product of the second row of A with the second column of B In other words: vector = sum(A. *B',2).

The first element in the diagonal is the scalar product of the first row of A with the first column of B. The second element in the diagonal is the scalar product of the second row of A with the second column of B. In other words: vector = sum(A.

*B',2).

I see you made good use of the 5 minute grace period for editing. ;) – gnovice Feb 20 '10 at 4:53 I'm glad the grace period exists. I seem to only see my major mistakes once I hit submit.

:) – Jonas Feb 20 '10 at 12:46.

This is how you could do it in MATLAB (probably similar to Octave syntax): vector = sum(A. *B',2); This will compute only the resulting diagonal of the operation A*B as a column vector vector.

Actually I think it's the dot product of the first row of A with the first column of B... the second diagonal element is the dot product of the second row and the second column... etc.

Yep. I mistyped. – Jonas Feb 20 '10 at 4:48.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions