% Test the Best Approximation of Matrices by Frame Mulitpliers
% Script-File
%
% This simple script tests the best approximation by frame multipliers
%
% date: 04/04/2005
%
% Author:  XXL .. Peter Balazs, contact: a8927259@unet.univie.ac.at
%
% Literature : [1] P. Balazs; Gabor frame multipliers with application to
%                  psychoacoustical masking (Ph.D. thesis) 
%              [2] P. Balazs; Hilbert-Schmidt Operators and Frames - 
%                  Classification, Approximation by Multipliers and 
%                  Algorithms; in preparation (2006)
%
% see also TestGabMulAppIrr2.m, GMAPPirr.m, testwavelet.m, waveletmat.m
%
% Copyright :  (c) Acoustics Research Institute, Austrian Academy of
%              Science, http://www.kfs.oeaw.ac.at

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) cosd(150) cosd(270); sind(30) cosd(150) sind(270)]
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)
