Team:Paris/Modeling/More f1 Algo

From 2008.igem.org

(Difference between revisions)
(find_ƒ1)
(Inv_ƒ1)
Line 30: Line 30:
== Inv_ƒ1 ==
== Inv_ƒ1 ==
-
 
+
<html><pre class="codeinput">
 +
<span class="keyword">function</span> quant_aTc = Inv_f1(inducer_quantity)
 +
<span class="comment">% gives the quantity of [aTc]i needed to get inducer_quantity of a protein
 +
</span><span class="comment">% throught a gene behind pTet
 +
</span>
 +
<span class="keyword">global</span> gamma, f0;
 +
<span class="comment">% parameters
 +
</span>
 +
    <span class="keyword">function</span> equa = F(x)
 +
        equa = f1( (f0/gamma) , x ) - inducer_quantity;
 +
    <span class="keyword">end</span>
 +
 +
options=optimset(<span class="string">'LevenbergMarquardt'</span>,<span class="string">'on'</span>,<span class="string">'TolX'</span>,1e-10,<span class="string">'MaxFunEvals'</span>,1e10,<span class="string">'TolFun'</span>,1e-10,<span class="string">'MaxIter'</span>,1e4);
 +
 +
quant_aTc = fsolve(F,1,options);
 +
 +
<span class="keyword">end</span>
 +
</pre></html>
</div>
</div>

Revision as of 03:43, 30 October 2008

find_ƒ1

function act_pTet = f1(TetR, aTc)
% activity of pTet in function of TetR and aTc
 
global beta16 K13 n13 K12 n12;
% parameters
 
act_pTet = beta16 * ( 1 - hill( TetR*(1 - hill( aTc, K13, n13 )), K12, n12 ) );
 
end

Inv_ƒ1

function quant_aTc = Inv_f1(inducer_quantity)
% gives the quantity of [aTc]i needed to get inducer_quantity of a protein
% throught a gene behind pTet
 
global gamma, f0;
% parameters
 
     function equa = F(x)
         equa = f1( (f0/gamma) , x ) - inducer_quantity;
     end
 
options=optimset('LevenbergMarquardt','on','TolX',1e-10,'MaxFunEvals',1e10,'TolFun',1e-10,'MaxIter',1e4);
 
quant_aTc = fsolve(F,1,options);
 
end