Publisher review:Diagonal indices returns linear indices of a specific diagonal of a square matrix. Have you ever wanted to change a diagonal of a square matrix? You may try this solution: (for example for changing 2nd diag above the main diag)p(find(diag(p,2))=0;But this m file is considerably faster.Usage:I=diagind(n,k)I: linear indices of the kth diagonal.n: order of a square matrixk: k=0 : main diagonal (default)k>0 : kth diagonal above the main diagk
Diagonal indices is a Matlab script for Mathematics scripts design by Masoud Alipour.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris