cdv2idv

PURPOSE ^

transformation matrix to transform cumomers to idv's.

SYNOPSIS ^

function [out] = cdv2idv(n)

DESCRIPTION ^

 transformation matrix to transform cumomers to idv's.
 idv = cdv2idv(log2(length(cdv)))*cdv;
 employs memoization.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [out] = cdv2idv(n)
0002 % transformation matrix to transform cumomers to idv's.
0003 % idv = cdv2idv(log2(length(cdv)))*cdv;
0004 % employs memoization.
0005 
0006 global CDV2IDVSAV
0007 
0008 if ~isempty(CDV2IDVSAV)
0009     if length(CDV2IDVSAV) >= n
0010         if ~isempty(CDV2IDVSAV{n})
0011             out =  CDV2IDVSAV{n};
0012             return;
0013         end
0014     end
0015 end
0016     
0017 out = speye(1,1);
0018 
0019 for i = 1:n
0020     out = [out, -out;  sparse([],[],[],length(out),length(out),0), out];
0021     CDV2IDVSAV{n} = out;
0022 end
0023 return;

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003