diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2012-03-15 15:54:14 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2012-03-15 15:54:14 +0000 |
commit | 1718d434efae26de02754c6622c43f4dc9e624b9 (patch) | |
tree | c2dafe942f65e94cd43e1ba17933b667f284d154 /R/SFORB.solution.R | |
parent | 2b244ef7d3cbebaaa653d8c8ac87090e34525f7a (diff) |
Update kinfit and mkin to the latest version published on BerliOS.
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@17 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'R/SFORB.solution.R')
-rw-r--r-- | R/SFORB.solution.R | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/R/SFORB.solution.R b/R/SFORB.solution.R new file mode 100644 index 0000000..45a4533 --- /dev/null +++ b/R/SFORB.solution.R @@ -0,0 +1,9 @@ +SFORB.solution = function(t, parent.0, k_12, k_21, k_1output) {
+ sqrt_exp = sqrt(1/4 * (k_12 + k_21 + k_1output)^2 + k_12 * k_21 - (k_12 + k_1output) * k_21)
+ b1 = 0.5 * (k_12 + k_21 + k_1output) + sqrt_exp
+ b2 = 0.5 * (k_12 + k_21 + k_1output) - sqrt_exp
+
+ parent = parent.0 *
+ (((k_12 + k_21 - b1)/(b2 - b1)) * exp(-b1 * t) +
+ ((k_12 + k_21 - b2)/(b1 - b2)) * exp(-b2 * t))
+}
|