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_RII.m
function [MOG,DEF,sn,sd,NUM,DEN]=filtre_RII(MOGi,DEFi,sni,sdi)

DEF=DEFi;
MOG=MOGi;
sn=sni;
sd=sdi;
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.5 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Dfinition des coefficients du numrateur','fontunits','normalized','fontsize',0.5,'fontweight','bold');
 MOG(2,2)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.65 0.8 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string',...
               'Exemple : NUM=[0,0.5]','fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
%s='NUM=[1,-1]';    
MOG(1,1)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.1 0.6 0.9 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','max',1,...
		'string',sn,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','sn=get(MOG(1,1),''string'');');
MOG(2,8)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.45 0.5 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Dfinition des coefficients du dnominateur','fontunits','normalized','fontsize',0.5,'fontweight','bold');
 MOG(2,4)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.4 0.8 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string',...
               'Exemple : DEN=[1,-0.5]','fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
MOG(1,2)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.1 0.35 0.9 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','max',1,...
		'string',sd,'fontunits','normalized','fontsize',0.5,'fontweight','bold');   
%inst1='sn=get(MOG(1,1),''string'');sd=get(MOG(1,2),''string'');[MOG,DEF,NUM,DEN]=coeff_RII(MOG,sn,sd,DEF);';
%inst2='[MOG,DEF]=lance_RII(MOG,DEF,NUM,DEN);affich_coeff(NUM,DEN,DEF);';
%instruction=[inst1,inst2];
inst1='sn=get(MOG(1,1),''string'');sd=get(MOG(1,2),''string'');[MOG,DEF,NUM,DEN]=coeff_RII(MOG,sn,sd,DEF,1);';
instruction=inst1;
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]=amplitude_duree_impulsion(MOG,DEF,NUM,DEN);';
%instruction2=[inst1,inst3];
instruction2='sn=get(MOG(1,1),''string'');sd=get(MOG(1,2),''string'');[MOG,DEF,NUM,DEN]=coeff_RII(MOG,sn,sd,DEF,2);';
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);
boutonsauve=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.95 0.1 0.05 0.1],...
	    'string','S','foregroundcolor','r','fontunits','normalized','fontsize',0.3,'fontweight','bold',...
        'callback','sauve_filtre');
boutonretour=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.75 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