Team:Paris/Modeling/Critere

From 2008.igem.org

(Difference between revisions)
 
(One intermediate revision not shown)
Line 4: Line 4:
|style="background:#ffffff"|
|style="background:#ffffff"|
-
To go back to the previous page : [[Team:Paris/Modeling/first parameters|First Parameters Obtained]]
+
To go back to the previous page : [[Team:Paris/Modeling/Score function|Explanations for the score function]]

Latest revision as of 16:22, 1 August 2008

To go back to the previous page : Explanations for the score function


function[c,im] = critere(x)

function[c,im] = critere(x)

%%

% [c,im] = critere(x)

% x : input signal

% c : value of the criteria

% im : proportional to the main frequency detected

l=length(x);

%% Fourier transform of the signal

fftx=abs(fft(x));

%% detection of the main frequency

im=Maxlocaux(fftx);

%% Initial value of the criteria

c=0;

%% If no maximum is detected, then the criteria is zero

% else we will sum the value of the first 5 peaks

% Then, we normalize by the overall values of the coefficients

if im(1)==0 c=0;

else

for k=1:min(5,length(im))

c=c+fftx(im(k));

end

c=c/sum(fftx(2:end));

end