Code covered by the BSD License  

Highlights from
Logiciels temps réel

Logiciels temps réel

by

 

Real-time software concerning the domains of the signal processing, feedback and regulation

filtre_sauve.m
function [MOG,DEF,NUM,DEN]=filtre_sauve(MOGi,DEFi)

MOG=MOGi;
DEF=DEFi;

boutonok=0;
boutonimp=0;
boutonretour=0;
NUM=[];
DEN=[];
figure(1)
e=ecran;
if e(1)<0
    e(1)=0;
end;
set(gcf,'position',e)
set(gcf,'unit','normalized','color','w')
grid off
set(gca,'xcolor','w','ycolor','w')
MOG(2,1)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.7 0.3 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Chargement du filtre','fontunits','normalized','fontsize',0.5,'fontweight','bold');
s=dir([pwd,'\filtres_sauves\*.mat']);
liste={s(:).name};
h=uicontrol(gcf,'style','text','unit','normalized',...
		            'position',[0.1 0.35 0.4 0.05],'backgroundcolor','w',...
	                'foregroundcolor','r','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','NOM DU FILTRE');                
MOG(1,1)=uicontrol(gcf,'style','popupmenu','unit','normalized',...
                    'position',[0.1,0.3,0.4,0.05],'backgroundcolor','y',...
                    'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold','string',liste');
inst1='k=get(MOG(1,1),''value'');[MOG,DEF,NUM,DEN]=coeff_sauve(MOG,DEF,k);';
inst2='[MOG,DEF]=lance_sauve(MOG,DEF,NUM,DEN);affich_coeff(NUM,DEN,DEF);';
instruction=[inst1,inst2];
boutonok=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.4 0.1 0.3 0.1],...
	    'string','FILTRAGE','foregroundcolor','r','fontunits','normalized','fontsize',0.3,'fontweight','bold',...
        'callback',instruction);
inst3='[MOG,DEF]=lance_sauve_imp(MOG,DEF,NUM,DEN);';
instruction2=[inst1,inst3];
boutonimp=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.05 0.1 0.3 0.1],...
	    'string','Rponse impulsionnelle','foregroundcolor','r','fontunits','normalized','fontsize',0.3,'fontweight','bold',...
        'callback',instruction2);
boutonretour=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.8 0.1 0.15 0.1],...
	    'string','MENU','foregroundcolor','r','fontunits','normalized','fontsize',0.3,'fontweight','bold',...
        'callback','delete(gcf);[MOG,DEF,sn,sd]=filtre_page1(fe,sn,sd);');

Contact us