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

ident_param_strejc.m
function [MOG,DEF,fe]=ident_param_strejc(fei)


fe=fei;
MOG=zeros(2,7);
DEF=zeros(9,1);
figure(1)
e=ecran;
if e(1)<0
    e(1)=0;
end;
set(gcf,'position',e,'color','w')
set(gcf,'unit','normalized')
grid off
set(gca,'xcolor','w','ycolor','w')
pause(0.1)
s='Modle de STREJC';
text(0.5,0.95,s,'color','r','fontunits','normalized','fontsize',0.03,...
    'fontweight','bold','horizontalalignment','center','verticalalignment','middle')
s='                 A';
text(0.4,0.9,s,'color','b','fontunits','normalized','fontsize',0.03,...
    'fontweight','bold','horizontalalignment','left',...
    'verticalalignment','middle','interpreter','Tex')
s='            (1 + \tau.p)^n';
text(0.4,0.84,s,'color','b','fontunits','normalized','fontsize',0.03,...
    'fontweight','bold','horizontalalignment','left',...
    'verticalalignment','middle','interpreter','Tex')
s='T(p) = -------------.e^{-T.p} ';
%for k=1:1:35
%    s=[s,'-'];
%end;
text(0.4,0.875,s,'color','b','fontunits','normalized','fontsize',0.03,...
    'fontweight','bold','horizontalalignment','left',...
    'verticalalignment','middle','interpreter','Tex')

text(0.6,0.75,'ENREGISTREMENT','color','b','fontunits','normalized','fontsize',0.03,...
    'fontweight','bold','horizontalalignment','left',...
    'verticalalignment','middle','interpreter','Tex')

sf='Frquence d''chantillonnage (Hz)';           
MOG(2,4)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.4 0.6 0.45 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','string',sf,'fontunits','normalized','fontsize',0.5,'fontweight','bold');
sfe=num2str(fe);           
MOG(1,4)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.87 0.6 0.1 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b',...
		'string',sfe,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','sfe=get(MOG(1,4),''string'');fe=str2num(sfe);DEF(4)=1/fe;');
sd='Dure enregistrement (s)';           
MOG(2,5)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.4 0.5 0.45 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','string',sd,'fontunits','normalized','fontsize',0.5,'fontweight','bold');
sduree='1';           
MOG(1,5)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.87 0.5 0.1 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b',...
		'string',sduree,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','sduree=get(MOG(1,5),''string'');D=str2num(sduree);DEF(5)=D;');
    
    
text(0.6,0.4,'SYNCHRONISATION','color','b','fontunits','normalized','fontsize',0.03,...
    'fontweight','bold','horizontalalignment','left',...
    'verticalalignment','middle','interpreter','Tex')

sniv='Niveau synchro (V)';           
MOG(2,6)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.4 0.3 0.45 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','string',sniv,'fontunits','normalized','fontsize',0.5,'fontweight','bold');
slevel='0.5';           
MOG(1,6)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.87 0.3 0.1 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b',...
		'string',slevel,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','slevel=get(MOG(1,6),''string'');niveau=str2num(slevel);DEF(6)=niveau;');
ss='sens (+1=croissant ; -1 =dcroissant)';           
MOG(2,7)=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.4 0.2 0.45 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','string',ss,'fontunits','normalized','fontsize',0.5,'fontweight','bold');
ssens='+1';           
MOG(1,7)=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.87 0.2 0.1 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b',...
		'string',ssens,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','ssens=get(MOG(1,7),''string'');sens=str2num(ssens);DEF(7)=sens;');

DEF(1)=0;
DEF(2)=1;
DEF(3)=0;
sfe=get(MOG(1,4),'string');
fe=str2double(sfe);
DEF(4)=1/fe;
sduree=get(MOG(1,5),'string');
D=str2double(sduree);
DEF(5)=D;
slevel=get(MOG(1,6),'string');
niveau=str2double(slevel);
DEF(6)=niveau;
ssens=get(MOG(1,7),'string');
sens=str2double(ssens);
DEF(7)=sens;
DEF(8)=round(DEF(5)/DEF(4)); 
DEF(9)=round(1.1*DEF(8));
%**************** Bouton "OK" de validation
boutonok=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.8 0.05 0.1 0.1],...
	    'string','OK','foregroundcolor','r','fontunits','normalized','fontsize',0.4,'fontweight','bold',...
        'callback','[DEF,fe]=lecture_parametre_strejc(MOG,DEF);lance_acquisition_strejc(DEF);');

%
%
%*************** bouton "FIN" : sortie du logiciel    
boutonfin=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.1 0.05 0.1 0.1],...
	    'string','FIN','foregroundcolor','r','fontunits','normalized','fontsize',0.4,'fontweight','bold',...
         'callback','fin;cd ..;liste_logiciels;');
    
    

Contact us