% Build the synthesis matrix for the canonical tight frame
% function dD = cantightframe(D)
%  
% inputs : D .......... the elements of the analysis frame (columnwise) 
%                       (n x K)
%
% output: tD ......... the matrix of the canonical tight frame of D
%
% usage:  tD = candualframe(D)
%
% test:   
%    D1 = [ 1 0 0.5 
%           0 1 0.5];
%    tD1 = candualframe(D1);
%
% date: 05/05/2008
%
% notes : Very simple code! This file is only provided for convenience.
%         The elements of the tight frame are the columns of tD.
% 
% Author:  XXL .. Peter Balazs, contact: Peter.Balazs@oeaw.ac.at
%
% Copyright : (c) Acoustics Research Institute, Austrian Academy of
%              Science
%              http://www.kfs.oeaw.ac.at
function tD = cantightframe(D)
S = D*D'; % frame operator
tD = S^(-1/2)*D;