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

an=val_norm(a,s)
function an=val_norm(a,s)

switch s
    case 2
        load([pwd,'\E6.mat'])
        S=E6;
    case 3
        load([pwd,'\E12.mat'])
        S=E12;
    case 4
        load([pwd,'\E24.mat'])
        S=E24;
     case 5
        load([pwd,'\E48.mat'])
        S=E48;
      case 6
        load([pwdf,'\E96.mat'])
        S=E96;
end;
an=zeros(size(a));
k=find(isinf(a)|(a>1e9)|isnan(a)|(a==0));
an(k)=a(k);
k=find((an==0) & (a~=0));
ordre_grandeur=floor(log10(a(k)))-1;
valeur=a(k)./(10.^ordre_grandeur);
lval=length(k);
for kval=1:1:lval
    nval=find(abs(S-valeur(kval))==min(abs(S-valeur(kval))));
    an(k(kval))=S(nval)*10^ordre_grandeur(kval);
end;

Contact us