Page 191 - Algorithm Collections for Digital Signal Processing Applications using MATLAB
P. 191

180                                                        Chapter 4
              ______________________________________________________________________

              createdaubinvmatrix.m

              function [res]=createdaubinvmatrix(m)
              a=[(1+sqrt(3))/(4*sqrt(2)) (3+sqrt(3))/(4*sqrt(2))  (3-sqrt(3))/(4*sqrt(2))  (1-sqrt(3))/(4*sqrt(2))];
              b=[(1-sqrt(3))/(4*sqrt(2)) -(3-sqrt(3))/(4*sqrt(2))  (3+sqrt(3))/(4*sqrt(2))  -(1+sqrt(3))/(4*sqrt(2))];
              t1=repmat([b(3) a(2)],1,(m/2));
              t2=repmat([a(1) b(2)],1,m/2);
              t3=repmat([b(1) 0],1,m/2);
              t4=repmat([a(4) 0],1,m/2);
              res=diag(repmat([a(3) b(4)],1,m/2)) + diag(t1(1:1:m-1),1)+ …
              diag(t2(1:1:m-2),2)+diag(t3(1:1:m-3),3)+diag(t4(1:1:m-1),-1) ;

              res=[res   [zeros(1,m-2) res(1,3) res(2,3)]' [zeros(1,m-2) res(1,4) res(2,4)]'];

              ___________________________________________________

           9.3      Program Illustration

























                          Figure 4-23. Audio signal before and after watermarking
   186   187   188   189   190   191   192   193   194   195   196