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

G=regle_gain(a,k,G)
function G=regle_gain(a,k,G)

switch a
    case 7
        pas=1.1;
    case 8
        pas=0.9;
    case 9
        pas=1.005;
    case 10
        pas=0.995;
end;
s=get_param(gcs,'parent');
if isempty(s)
    modele=get_param(gcs,'name');
else
    modele=s;
end;
if k~=1
    gs=get_param([modele,'/Gain',num2str(k-1)],'gain');
else
    gs=get_param([modele,'/Gain'],'gain');
end;
g=str2double(gs)*pas;
G(k)=g;
gs=num2str(g);
if k~=1
    set_param([modele,'/Gain',num2str(k-1)],'gain',gs);
else
    set_param([modele,'/Gain'],'gain',gs);
end;

Contact us