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

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

MOG=MOGi;
DEF=DEFi;
if ~isempty(NUM)&~isempty(DEN)
    nettoyage;
    figure(2)
    e=ecran;
    if e(1)<0
     e(1)=0;
    end;
    boutonok2=0;
    set(gcf,'position',e)
    set(gcf,'unit','normalized','color','w')
    grid off
    set(gca,'xcolor','w','ycolor','w')
    MOG(2,6)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.7 0.3 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Amplitude de l''impulsion','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    As='1';
    MOG(1,3)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.1 0.6 0.9 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','max',1,...
		'string',As,'fontunits','normalized','fontsize',0.5,'fontweight','bold');
    MOG(2,7)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.5 0.3 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Priode (en nombre d''chantillons)','fontunits','normalized','fontsize',0.5,'fontweight','bold');
    Ds='100';
    MOG(1,4)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.1 0.4 0.9 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','max',1,...
		'string',Ds,'fontunits','normalized','fontsize',0.5,'fontweight','bold');
    inst1='As=get(MOG(1,3),''string'');DEF(3)=str2num(As);Ds=get(MOG(1,4),''string'');';
    inst2='DEF(4)=str2num(Ds);[MOG,DEF]=lance_RII_imp(MOG,DEF,NUM,DEN);affich_coeff(NUM,DEN,DEF);';
    
    instruction=[inst1,inst2];
    boutonok2=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.6 0.1 0.1 0.1],...
	    'string','OK','foregroundcolor','r','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
        'callback',instruction);
end;

Contact us