MATLAB: Access to array elements

access array elementssub2ind

Hi,
I have a matrix, A, and I want to access the elements given by the vectors ind_rows, ind_cols. If I make A(ind_rows,ind_cols) I get a matrix of size ind_rows times ind_cols, but I am just interested in the diagonal of this matrix!
I have found a way to do this:
siz = size(A);
AA = A(1:end); % convert the matrix in a vector
IND = sub2ind(siz,ind_rows,ind_cols);
res = AA(IND);
It works, but I guess there must be a way to do this without rearranging the matrix in a vector, and in a cleaner way.
Thanks in advance!
Ana