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

parametres_filtre.m
switch type_de_filtre
    
case {'PL','PH'}
    if exist('txt_fap')==1
        delete(txt_fap)
        clear('txt_fap')
    end;
    if exist('txt_fpp')==1
        delete(txt_fpp)
        clear('txt_fpp')
    end;
    if exist('ed_fap')==1
        delete(ed_fap)
        clear('ed_fap')
    end;
    if exist('ed_fpp')==1
        delete(ed_fpp)
        clear('ed_fpp')
    end;
    if exist('txt_fam')==1
        delete(txt_fam)
        clear('txt_fam')
    end;
    if exist('txt_fpm')==1
        delete(txt_fpm)
        clear('txt_fpm')
    end;
    if exist('ed_fam')==1
        delete(ed_fam)
        clear('ed_fam')
    end;
    if exist('ed_fpm')==1
        delete(ed_fpm)
        clear('ed_fpm')
    end;
    txt_fa=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.45 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','FA (Hz)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_fa=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.45 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
               'string',val_fa,...
		    'callback',['val_fa=get(ed_fa,''string'');','FA=str2num(val_fa);']);
    txt_fp=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.35 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','FP (Hz)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_fp=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.35 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
                'string',val_fp,...
		    'callback',['val_fp=get(ed_fp,''string'');','FP=str2num(val_fp);']);
    txt_amin=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.25 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','Amin (dB)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_amin=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.25 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
               'string',val_amin,...
		    'callback',['val_amin=get(ed_amin,''string'');','Amin=str2num(val_amin);']);
    if strcmp(approximation,'butterworth')||strcmp(approximation,'bessel')
        Amax=-3;
        if exist('txt_amax')==1
            delete(txt_amax)
            clear('txt_amax')
        end;
        if exist('ed_amax')==1
            delete(ed_amax)
            clear('ed_amax')
        end;            
    else        
        txt_amax=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.2 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','AMax (dB)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
        ed_amax=uicontrol(gcf,'style','edit','unit','normalized',...
		    'position',[0.71 0.2 0.1 0.035],'backgroundcolor','y',...
	        'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		    'string',val_amax,...
		    'callback',['val_amax=get(ed_amax,''string'');','Amax=str2num(val_amax);']);
    end; 
    
case {'PB','RB'}
    if exist('txt_fa')==1
        delete(txt_fa)
        clear('txt_fa')
    end;
    if exist('txt_fp')==1
        delete(txt_fp)
        clear('txt_fp')
    end;
    if exist('ed_fa')==1
        delete(ed_fa)
        clear('ed_fa')
    end;
    if exist('ed_fp')==1
        delete(ed_fp)
        clear('ed_fp')
    end;
    txt_fam=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.45 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','FA- (Hz)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_fam=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.45 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
               'string',val_fam,...
		    'callback',['val_fam=get(ed_fam,''string'');','FAM=str2num(val_fam);']);
    txt_fap=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.4 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','FA+ (Hz)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_fap=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.4 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
               'string',val_fap,...
		    'callback',['val_fap=get(ed_fap,''string'');','FAP=str2num(val_fap);']);
    txt_fpm=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.35 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','FP- (Hz)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_fpm=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.35 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
                'string',val_fpm,...
		    'callback',['val_fpm=get(ed_fpm,''string'');','FPM=str2num(val_fpm);']);
    txt_fpp=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.3 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','FP+ (Hz)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_fpp=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.3 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
                'string',val_fpp,...
		    'callback',['val_fpp=get(ed_fpp,''string'');','FPP=str2num(val_fpp);']);        
    txt_amin=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.25 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','Amin (dB)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    ed_amin=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.71 0.25 0.1 0.035],'backgroundcolor','y',...
	           'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
               'string',val_amin,...
		    'callback',['val_amin=get(ed_amin,''string'');','Amin=str2num(val_amin);']);
    if strcmp(approximation,'butterworth')||strcmp(approximation,'bessel')
        Amax=-3;
        if exist('txt_amax')==1
            delete(txt_amax)
            clear('txt_amax')
        end;
        if exist('ed_amax')==1
            delete(ed_amax)
            clear('ed_amax')
        end;            
    else        
        txt_amax=uicontrol(gcf,'style','text','unit','normalized',...
		    'position',[0.6 0.2 0.1 0.035],...
	        'backgroundcolor','w','foregroundcolor','k','string','AMax (dB)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
        ed_amax=uicontrol(gcf,'style','edit','unit','normalized',...
		    'position',[0.71 0.2 0.1 0.035],'backgroundcolor','y',...
	        'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		    'string',val_amax,...
		    'callback',['val_amax=get(ed_amax,''string'');','Amax=str2num(val_amax);']);
    end; 
end;

bouton=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.9 0.1 0.05 0.05],...
	          'string','OK','callback','suite;');
          
              

Contact us