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

[MOG,DEF,P_RdeP]=def_RdeP(MOGi,sn,sd,DEFi)
function [MOG,DEF,P_RdeP]=def_RdeP(MOGi,sn,sd,DEFi)

NUM=[1 1];
DEN=[1 1];
P_RdeP=ones(4,2);
te=DEFi(1);
DEF=DEFi;
MOG=MOGi;
if sn(end)~=';'
    sn=[sn,';'];
end;
if sd(end)~=';'
    sd=[sd,';'];
end;
test1=findstr(sn,'NUM=');
if isempty(test1)
    MOG(4,5)=uicontrol(gcf,'style','text',...
        'unit','normalized',...
        'position',[0.1 0.5 0.8 0.05],...
        'backgroundcolor','w',...
        'foregroundcolor','r',...
        'string','DEFINIR LES COEFFICIENTS PAR NUM=...',...
        'fontunits','normalized','fontsize',0.5,'fontweight','bold');
    pause(1)
    delete(MOG(4,5)); 
    return;
else
    try
        eval(sn);
    catch
        MOG(4,5)=uicontrol(gcf,'style','text',...
            'unit','normalized',...
             'position',[0.1 0.5 0.8 0.05],...
             'backgroundcolor','w',...
              'foregroundcolor','r','string','ERREUR DE PROGRAMMATION !',...
              'fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
        pause(1)
        delete(MOG(4,5)); 
        return;
    end;
end;
test2=findstr(sd,'DEN=');
if isempty(test2)
    MOG(4,6)=uicontrol(gcf,'style','text',...
        'unit','normalized',...
        'position',[0.1 0.3 0.8 0.05],...
        'backgroundcolor','w',...
         'foregroundcolor','r','string','DEFINIR LES COEFFICIENTS PAR DEN=...',...
         'fontunits','normalized','fontsize',0.5,'fontweight','bold');
    pause(1)
    delete(MOG(4,6)); 
    return;
else
    try
        eval(sd);
    catch
        MOG(4,6)=uicontrol(gcf,'style','text',...
            'unit','normalized',...
            'position',[0.1 0.3 0.8 0.05],...
            'backgroundcolor','w',...
            'foregroundcolor','r','string','ERREUR DE PROGRAMMATION !',...
            'fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
        pause(1)
        delete(MOG(4,6)); 
        return;
    end;
end;
H=tf(NUM,DEN);
Hd=c2d(H,te,'tustin');
[NUMZ,DENZ]=tfdata(Hd,'v');
P_RdeP=meme_longueur(NUM,DEN,NUMZ,DENZ);
lance_correcteur_RdeP;

Contact us