相关代码 |
|
function [y,N0]=circonv(x1,x2,N) x0=zeros(N); x1_l=length(x1); x2_l=length(x2); if x1_l>x2_l max=x1_l; else max=x2_l; end if max max=N; end y1=zeros(1,max); y2=zeros(1,max); y1=[x1,zeros(1,max-x1_l)]; y2=[x2,zeros(1,max-x2_l)]; y0=zeros(1,N); for i=1:N y0(1,i)=y2(1,i); end for i=1:N for j=1:N tem=mod(j-i,N)+1; x0(i,j)=y1(1,tem); end end y=y0*x0; N0=0:N-1;
相关资源 |
|