Need to multiply matrix diagonals, but with periodic boundary conditions.

Hi, I need to obtain a vector containing the product of each diagonal of a matrix, say A, but with periodic boundary conditions.
Unfortunately X=diag(A,k) does not invoke the necessary periodic condition.
So for example, for A = (1 2 3, 4 5 6, 7 8 9)
I would expect to obtain V=(45, 48, 135)..
Can anyone help me?

Answers (0)

Categories

Asked:

on 24 Oct 2013

Edited:

on 24 Oct 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!