Code covered by the BSD License  

Highlights from
EC1302 DSP Lab

EC1302 DSP Lab

by

 

These are matlab code for experiments in the course EC1302 DSP Lab.

y=linsav2(x,h,L)
function y=linsav2(x,h,L)

  P=length(x);
  M=length(h);
 
  inc=L-M+1;
  R=rem(P+M-1-L,inc);
  long=[zeros(1,M-1),x,zeros(1,inc-R)];
  short=[h,zeros(1,L-M)];
  
  nfr=((P-R)/inc)+1;
  
  H=[];
  for i=0:L-1
      for j=0:L-1
          hj(mod(j+i,L)+1)=short(j+1);
      end
      H=[H,hj'];
  end

  yii=[];
  for i=1:nfr
    xi=long((1+(i-1)*inc):(L+(i-1)*inc));
    yi=H*xi';
    yii=[yii,(yi(M:L))'];
  end
  y=yii(1:P+M-1);

Contact us