Matrix roots with Schurlog for Matlab and Octave
schurlog.m - a MATLAB and Octave script for computing roots and powers of a matrix A using the Schurlog algorithm of [1]. View/Download. function [Y,Z]=schurlog(A,p,q,v) % Y=SCHURLOG(A,p) computes A^(1/p) using a binary powering technique. % Y=SCHURLOG(A,p,q) computes A^(q/p)=(A^(1/p))^q using a % binary powering technique. % Y=SCHURLOG(A,p,q,v) computes A^(q/p) where the determinations of % the p-th roots are chosen according to the vector v(1),...,v(s) % where s is the number of diagonal blocks in the real Schur form % of A and v(i) is the determination of the p-th root of one % eigenvalue on the i-th block obtained by schur(A), in the complex % conjugate case two conjugate determinations are chosen in order % to get real roots and fractional powers % v(i)=0 for the principal determination % v(i)=1,...,p-1, for the other determinations. % % Reference. % B. Iannazzo and C. Manasse, "A Schur logarithmic algorithm for % fractional powers of a matrix", SIAM J. Matrix Anal. Appl, 34-2, % pp. 794-813, 2013. % % Warning! This is just a straightforwad implementation. % The code is not optimized. % works for real matrices Reference [1] B. Iannazzo and C. Manasse, A Schur logarithmic algorithm for fractional powers of matrices, SIAM J. Matrix Anal. Appl., 34-2 (2013), pp. 794–813 |