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

📄 laolugui.m

📁 该程序是实现了数字信号处理中的一种典型滤波方法
💻 M
字号:
clear all;
clc 
clf reset
global u z pn z2 vpop;
H=axes( 'unit' , 'normalized' , 'position' ,[0,0,1,1], 'visible' , 'off' );
  set(gcf, 'currentaxes' ,H);
  h_fig=get(H, 'parent' );

%////////////
set(h_fig, 'unit' , 'normalized' , 'position' ,[0.08,0.08,0.8,0.78]);
h_axes=axes( 'parent' ,h_fig, ...
'unit' , 'normalized' , 'position' ,[0.066,0.066,0.76,0.86], ...
'xlim' ,[0 1], 'ylim' ,[0 1], 'fontsize' ,12); 
%///////////////////
h_text1=uicontrol(h_fig, 'style' , 'text' , ...
'unit' , 'normalized' , 'position' ,[0.86,0.88,0.12,0.06], ...
'horizontal' , 'left' , 'string' ,'算法类型','fontsize' ,10); 
%//////////////
h_pop=uicontrol(gcf, 'style' , 'popup' , ... % 制作弹出菜单 
'unit' , 'normalized' ,'position' ,[0.84,0.8,0.135,0.1], ... 
'string' , 'LMS横向与格型|LMS横向与FTF','fontsize' ,8); % 设置弹出框中选项名 
vpop=1;
set(h_pop,'callback','vpop=get(h_pop,''value'');');

h_text2=uicontrol(h_fig, 'style' , 'text' , ...
'unit' , 'normalized' , 'position' ,[0.86,0.76,0.12,0.06], ...
'horizontal' , 'left' , 'string' ,'步进因子u=','fontsize' ,10); 

h_edit1=uicontrol(h_fig, 'style' , 'edit' , ...
'unit' , 'normalized' , 'position' ,[0.867,0.71,0.08,0.05], ...
'horizontal' , 'left','fontsize' ,10 , ...
'callback' ,[ ...
'z= str2double(get(gcbo,''string''));' , ...
'u=z;']);
%////////////////////////
h_text3=uicontrol(h_fig, 'style' , 'text' , ...
'unit' , 'normalized' , 'position' ,[0.86,0.62,0.12,0.06], ...
'horizontal' , 'left' , 'string' ,'噪声功率Pn =','fontsize' ,10); 

h_edit2=uicontrol(h_fig, 'style' , 'edit' , ...
'unit' , 'normalized' , 'position' ,[0.867,0.57,0.08,0.05], ...
'horizontal' , 'left','fontsize' ,10 , ...
'callback' ,[ ...
'z2= str2double(get(gcbo,''string''));' , ...
'pn=z2;']);

h_text4=uicontrol(h_fig, 'style' , 'text' , ...
'unit' , 'normalized' , 'position' ,[0.86,0.44,0.12,0.08], ...
'horizontal' , 'left' , 'string' ,'输入信号以白噪声通过AR模型产生','fontsize',10); 

h_push1=uicontrol(h_fig, 'style' , 'push' , ...
'unit' , 'normalized' , 'position' ,[0.867,0.28,0.08,0.06], ...
'string' , 'Grid on' ,'fontsize' ,12, 'callback' , 'Grid on' );
h_push2=uicontrol(h_fig, 'style' , 'push' , ...
'unit' , 'normalized' , 'position' ,[0.867,0.2,0.08,0.06], ...
'string' , 'Grid off' ,'fontsize' ,12, 'callback' , 'Grid off' ); 

h_push3=uicontrol(h_fig, 'style' , 'push' , ...
'unit' , 'normalized' , 'position' ,[0.867,0.12,0.08,0.06], ...
'string' , 'OK' ,'fontsize' ,12);
set(h_push3,'callback','apply(vpop,u,z2)');

h_push4=uicontrol(h_fig, 'style' , 'push' , ...
'unit' , 'normalized' , 'position' ,[0.867,0.04,0.08,0.06], ...
'string' , 'CLOSE' ,'fontsize' ,12, 'callback' , 'close all' ); 

⌨️ 快捷键说明

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