www.pudn.com > Svd_Yuyin.zip > Svd_Yuyin.m


      %%%%%   这个程序主要是试验一下 SVD 在语音信号去噪中的应用; 
      %%%%    以后编程多用列向量 
      clear all; close all; 
      t=cputime; 
      s_ori=wavread('C:\Matlab\work\Write_In_Paper\Shi_Yan.wav'); 
      sig= awgn(s_ori,10,'measured'); 
      xds2=sig; 
      %%%%%%%%%%%%%%%以下内容是我自己所加,目的是对ca2=xds2进行奇异值分解去噪 
 N=100;    ca2=xds2; 
     ca2_new=zeros(size(ca2)); 
for  i=1:468 
     w=zeros(N,1); 
     w=ca2(100*(i-1)+1:100*i); 
     ww=zeros(10,10); 
for  num=1:10 
     ww(num,:)=w(1+10*(num-1):10*num)'; 
end; 
     [u,s,v]=svd(ww);  ss=s; 
     total=TRACE(s); 
     sigma_total=0; 
for  p=1:10 
    if sqrt(sigma_total/total)>=0.9 
        break; 
    else  sigma_total=sigma_total+s(p,p); 
    end; 
end; 
       p_end=p; 
        
for  p=p_end:10 
     s(p,p)=0; 
end; 
     s_new=s; 
     ww_new=u*s_new*v'; 
     w_new=zeros(N,1); 
      
for  num=1:10 
     w_new(10*(num-1)+1:10*num)=ww_new(num,:)'; 
end; 
     ca2_new(100*(i-1)+1:100*i)=w_new; 
end; 
    ca2_new(46801:46860)=ca2(46801:46860); 
    xds2_new=ca2_new; 
    s_new=xds2_new; 
    %%%%%   所增加的内容完毕 
  figure; 
  subplot(311); 
  plot(s_ori); axis tight; 
  subplot(312); 
  plot(sig);axis tight; 
  subplot(313); 
  plot(s_new);axis tight; 
  t1=cputime-t