⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 circonvt_example.m

📁 很多matlab的源代码
💻 M
字号:
figure('position',[10 10 800 500], 'name','循环卷积');

axes('position',[0.1 0.1 0.65 0.8]);

Hc_close=uicontrol(gcf,'style','push',...%
'position',[600 100 100 25],...        % 
'string','Close',...                 %
'Callback','Close');                 %以上四行代码是产生close按键 

Hc_info=uicontrol(gcf,'style','push',...%
'position',[500 100 100 25],...        % 
'string','info',...                 %
'Callback','web http://www.bupt.edu.cn -browser');                 %以上四行代码是产生info按键 

z2=uicontrol('style','text',...
    'position',[150 100 25 15],...
    'string','N=4');

y3_string=['N=N+1;','if N>10','N=10;','end;','y=circonvt(x1,x2,N);','n=[0:1:length(y)-1];','stem(n,y);','axis([0,11,0,max(y)+1]);','set(z2,''string'',strcat(''N='',int2str(N)));','ylabel(''cir conv '');'];
y3=uicontrol('style','push',...
    'position',[250 100 50 20],...
    'string','N + 1',...
    'callback',y3_string);

y4_string=['N=N-1;','if N<4','N=4;',' end;','y=circonvt(x1,x2,N);','n=[0:1:length(y)-1];','stem(n,y);','axis([0,11,0,max(y)+1]);','set(z2,''string'',strcat(''N='',int2str(N)));','ylabel(''cir conv '');'];
y4=uicontrol('style','push',...
    'position',[200 100 50 20],...
    'string','N - 1',...
    'callback',y4_string);

n1=[0,1,2,3];x1=[1,1,1,1];
n2=[0,1,2,3];x2=[1,2,3,4];
subplot(3,2,1);
stem(n1,x1);
axis([0,11,0,2]);
ylabel('x1');

subplot(3,2,2);
stem(n2,x2);
axis([0,11,0,5]);
ylabel('x2');

subplot(3,2,3);
y=circonvt(x1,x2,7);
n=[0:1:length(y)-1];
stem(n,y);
axis([0,11,0,max(y)+1]);
ylabel('x1*x2');

subplot(3,2,4);
N=4;
y=circonvt(x1,x2,N);
n=[0:1:length(y)-1];
stem(n,y);
axis([0,11,0,max(y)+1]);
ylabel('cir conv ');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -