?? circonvt_example.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 + -