Hello everyone, I am wondering whether there is some function like MatGetDiagonal to get the k-th diagonal (above or below the main diagonal) of the matrix A. If I have to write my own function, what built-in function should I use to get a particular element of A? It seems that MatGetValues returns a block of matrix. I guess if I only extract one element once, it would not be efficient. Any suggestions? Thanks.
Best, Xiangdong
