# Team:Paris/Modeling/More f2 Algo

(Difference between revisions)
 Revision as of 03:43, 30 October 2008 (view source)Hugo (Talk | contribs) (→find_ƒ2)← Older edit Revision as of 03:44, 30 October 2008 (view source)Hugo (Talk | contribs) (→Inv_ƒ2)Newer edit → Line 30: Line 30: == Inv_ƒ2 == == Inv_ƒ2 == - +
+                                                                                                  function quant_ara = Inv_f2(inducer_quantity)
+                                                                                                  % gives the quantity of [ara]i needed to get inducer_quantity of a protein
+                                                                                                  % throught a gene behind pBad
+
+                                                                                                  function equa = F(x)
+                                                                                                  equa = f2( x ) - inducer_quantity;
+                                                                                                  end
+
+                                                                                                  options=optimset('LevenbergMarquardt','on','TolX',1e-10,'MaxFunEvals',1e10,'TolFun',1e-10,'MaxIter',1e4);
+
+                                                                                                  quant_ara = fsolve(F,1,options);
+
+                                                                                                  end
+

## find_ƒ2

```function act_pBad = f2(arab)
% activity of pBad in function of arabinose

% parameters

end
```

## Inv_ƒ2

```function quant_ara = Inv_f2(inducer_quantity)
% gives the quantity of [ara]i needed to get inducer_quantity of a protein
% throught a gene behind pBad

function equa = F(x)
equa = f2( x ) - inducer_quantity;
end

options=optimset('LevenbergMarquardt','on','TolX',1e-10,'MaxFunEvals',1e10,'TolFun',1e-10,'MaxIter',1e4);

quant_ara = fsolve(F,1,options);

end
```