function [lmax lmin] = power_A_iteration(S,M,K,maxitl) % performs power iteration algorithm to get highest and lowest eigenvalue of operator T % % T : A --> \star A \star S \star adjoint_of_S % %Input % S N*T Sources matrix % M,K Integers such that size(A)=(M,K) % maxitl Number of iterations % %Output % lmin lowest eigenvalue % lmax highest eigenvalue [N,T] = size(S); A=ones(M,N,K); Ag=zeros(M,N,K); for it=1:maxitl AS=creation_mel_conv(A,S); Ag=adjoint_conv(S,AS); lambda = max(abs(Ag(:))); A = Ag/lambda; end lmax=lambda; A=ones(M,N,K); Ag=zeros(M,N,K); for it=1:maxitl AS=creation_mel_conv(A,S); Ag=adjoint_conv(S,AS); Ag=2*lmax*A-Ag; lambda = max(abs(Ag(:))); A = Ag/lambda; end lmin=2*lmax-lambda; end % Written by Matthieu Kowalski, 2010 % Updated by Alexis Benichoux, 2011