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

📄 solve_dif_equation.m

📁 很多matlab的源代码
💻 M
字号:
figure('position',[10 50 850 500],'name','差分方程');
axes('position',[0.15 0.35 0.7 0.25]);
b=[1];a=[1,-1,0.9];
x=stepseq(0,-20,120);
s=filter(b,a,x);
n=[-20:120];
h=stem(n,s);
set(h,'LineWidth',2);
set(h,'MarkerSize',2);
xlabel('n');
ylabel('s(n)');
title('Step Response');
axes('position',[0.15 0.7 0.7 0.25]);
b=[1];a=[1,-1,0.9];
x=impseq(0,-20,120);
n=[-20:120];
h=filter(b,a,x);
w=stem(n,h);
set(w,'LineWidth',2);
set(w,'MarkerSize',2);
xlabel('n');
ylabel('h(n)');
title('Impulse Response');
q10= {'说明:'
    '|b=[1];a=[1,-1,0.9];'
    'x=stepseq(0,-20,120);'
    's=filter(b,a,x);'
    'n=[-20:120];'
    'b=[1];a=[1,-1,0.9];'
    'x=impseq(0,-20,120);'
    'n=[-20:120];|h=filter(b,a,x);' }  ;
h2=uicontrol('style','listbox','position',[130 10 300 130],...
'string',q10,...
'max',2);
Hc_close=uicontrol(gcf,'style','push',...%
'position',[700 30 60 25],...        % 
'string','Close',...                 %
'Callback','Close');                 %以上四行代码是产生close按键  
%h1=uicontrol('style','popupmenu','string','差分方程',...
%'position',[480 110 200 20]);

⌨️ 快捷键说明

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