onv计算线性卷积Рycn=circonv(xn,hn,6);%用函数circonv计算N1点圆周卷积Рny1=[0:1:length(yln)-1];Рny2=[0:1:length(ycn)-1];Рsubplot(2,1,1);Рstem(ny1,yln);Рylabel('线性卷积');Рsubplot(2,1,2);Рstem(ny2,ycn);Рylabel('圆周卷积');Р•函数(3)x(n)⑨y(n)Рclear all;РN1=5;РN2=4;Рxn=[1 2 3 4 5];%生成x(n)Рhn=[1 2 1 2];%生成h(n)Рyln=conv(xn,hn);%直接用函数conv计算线性卷积Рycn=circonv(xn,hn,9);%用函数circonv计算N1点圆周卷积Рny1=[0:1:length(yln)-1];Рny2=[0:1:length(ycn)-1];Рsubplot(2,1,1);Рstem(ny1,yln);Рylabel('线性卷积');Рsubplot(2,1,2);Рstem(ny2,ycn);Рylabel('圆周卷积');Р•函数(4)x(n)⑩y(n)Рclear all;РN1=5;РN2=4;Рxn=[1 2 3 4 5];%生成x(n)Рhn=[1 2 1 2];%生成h(n)Рyln=conv(xn,hn);%直接用函数conv计算线性卷积Рycn=circonv(xn,hn,10);%用函数circonv计算N1点圆周卷积Рny1=[0:1:length(yln)-1];Рny2=[0:1:length(ycn)-1];Рsubplot(2,1,1);Рstem(ny1,yln);Рylabel('线性卷积');Рsubplot(2,1,2);Рstem(ny2,ycn);Рylabel('圆周卷积');