one.m

来自「matlab的一些基础程序」· M 代码 · 共 28 行

M
28
字号
%a) x(n)=2*delta(n+2) - delta(n-4), -5<=n<5
clc
switch  b 
    case  'ab'
        clc,clf 
       subplot('Position',    [0.1 0.3 0.8 0.6])
m2=uicontrol(gcf,'style','pushbutton','string','上一题','fontsize',18,'units','normalized','position',...
    [0.1 0.1 0.2 0.1],'foregroundcolor','r','backgroundcolor','b','callback','five');
m3=uicontrol(gcf,'style','pushbutton','string','回目录','fontsize',18,'units','normalized','position',...
    [0.4 0.1 0.2 0.1],'foregroundcolor','r','backgroundcolor','b','callback','abc');
m3=uicontrol(gcf,'style','pushbutton','string','下一题','fontsize',18,'units','normalized','position',...
    [0.7 0.1 0.2 0.1],'foregroundcolor','r','backgroundcolor','b','callback','two');
        
    case  '1'    
      figure;
end
n=[-5 : 5];
x=2*impseq(-2,-5,5) - impseq(4,-5 ,5);
 stem(n,x);title('Sequence in Example 3.1a')
xlabel('n'); ylabel('x(n)');axis([-5,5,-2,3])







⌨️ 快捷键说明

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