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,NUM,DEN]=coeff_RII(MOGi,sn,sd,DEFi,type)
function [MOG,DEF,NUM,DEN]=coeff_RII(MOGi,sn,sd,DEFi,type)

NUM=[];
DEN=[];
te=DEFi(1);
DEF=DEFi;
MOG=MOGi;
if sn(end)~=';'
    sn=[sn,';'];
end;
if sd(end)~=';'
    sd=[sd,';'];
end;
test=findstr(sn,'NUM=');
if isempty(test)
    MOG(2,3)=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');
else
    try
        eval(sn)
    catch
        MOG(2,3)=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'); 
    end;
end;
test=findstr(sd,'DEN=');
if isempty(test)
    MOG(2,5)=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');
else
    try
        eval(sd)
    catch
        MOG(2,5)=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'); 
    end;
end;
if ~isempty(NUM)&&~isempty(DEN)
    if type==1
        [MOG,DEF]=lance_RII(MOG,DEF,NUM,DEN);
        affich_coeff(NUM,DEN,DEF);
    else
        [MOG,DEF]=amplitude_duree_impulsion(MOG,DEF,NUM,DEN);
    end;
end;

Contact us