📄 simple_signal.m
字号:
figure('position',[10 10 800 500],...
'name','基本序列的表示');
n=[0:10];
n0=3
x= [(n-n0) == 0];
subplot(2,1,1);
h=stem(n,x);
set(h,'LineWidth',2);
set(h,'MarkerSize',2);
xlabel('n');ylabel('x(n)')
title('单位样本序列')
Hc_close=uicontrol(gcf,'style','push',...%
'position',[650 40 100 25],... %
'string','Close',... %
'Callback','Close'); %以上四行代码是产生close按键
h1=uicontrol('style','popupmenu','string','单位样本序列|单位阶跃序列|实指数序列|复数指数序列|正弦序列|随即序列|周期序列',...
'position',[550 140 200 20]);
we1 = {'单位样本序列'
'δ(n) = 1 n=0'
'δ(n) =0 n≠0'
'function[x,n]=impseq(n0,n1,n2)'
'%Generates x(n)=delta(n-n0);'
' n1 <= n <= n2'
'%--------------------------------------'
'%[x,n]=impseq(n0,n1,n2)'
'%'
'n= [n1:n2]; x= [(n-n0) == 0;]'
''
'例:'
'n1=0'
'n2=10'
'n=3| '};
h2=uicontrol('style','listbox','FontWeight','demi','position',[20 20 500 150],...
'string',we1,...
'max',2);
h3=uicontrol('style','text','position',[20 170 40 14],'FontWeight','demi','string','说明')
set(h1,'Callback','simple_signal_sub');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -