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

📄 dfs_example.m

📁 很多matlab的源代码
💻 M
字号:
figure('position',[10 10 800 500],'name','离散傅立叶变换');
axes('position',[0.1 0.1 0.65 0.8]);

L=5;
N=20;
dfs_sample_sub;

c1=uicontrol('style','text',...
    'position',[650 450 80 16],...
    'string','占空比(L/N)');
c2=uicontrol('style','text',...
    'position',[650 430 20 16],...
    'string','L');
c3=uicontrol('style','text',...
    'position',[650 410 20 16],...
    'string','N');
c4=uicontrol('style','edit',...
    'position',[680 430 55 16],...
    'string',int2str(L));
c5=uicontrol('style','edit',...
    'position',[680 410 55 16],...
    'string',int2str(N));
Hc_close=uicontrol(gcf,'style','push',...
    'position',[680 50 80 25],...
    'string','Close',...
    'Callback','close');
 
c4_1='L=round(str2num(get(c4,''string'')));';
c4_2='if L<=0 | L>=N,';
c4_3='L=5;';
c4_4='end;';
c4_5='set(c4,''string'',int2str(L));';
c4_6='dfs_sample_sub;';
set(c4,'callback',[c4_1,c4_2,c4_3,c4_4,c4_5,c4_6]);

c5_1='N=round(str2num(get(c5,''string'')));';
c5_2='if N<=L | N>=50,';
c5_3='N=20;';
c5_5='end;';
c5_4='set(c5,''string'',int2str(N));';
c5_6='dfs_sample_sub;';
set(c5,'callback',[c5_1,c5_2,c5_3,c5_4,c5_5,c5_6]);

⌨️ 快捷键说明

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