% two simple examples for the best approximation by frame multipliers
A = [ 3 0 ; 0 5];
D = [ 1/2 sqrt(3)/2 ;  sqrt(3)/2  -1/2];
[AD cD] = ApprFramMult(A,D)

T = eye(2,2)
D = [cosd(30) 1 0; sind(30) 1 -1]
[TA coeff] = ApprFramMult(T,D)
% % this frame is NOT tight, still the identity could be approximated 
S = D*D';
eig(S)
tS = mpower(S,-0.5)
tD = tS*D
[TAt coefft] = ApprFramMult(T,tD)
