Simbiology: using a dummy species to fit data to a sum of real species with sbiofit
2 ビュー (過去 30 日間)
古いコメントを表示
Hussein Abdallah
2018 年 10 月 27 日
回答済み: Arthur Goldsipe
2018 年 10 月 29 日
Hello,
Let's say I have a model with two species:
addspecies('compartment1',s1,'InitialAmount',100,'InitialAmountUnits','nanomole')
addspecies('compartment1',s2,'InitialAmount',50,'InitialAmountUnits','nanomole')
and now I am trying to fit a trace 'DATA' to the sum of these two species using sbiofit. I thought I could simply do this in two steps:
1) add a dummy species to track the sum
addspecies('compartment1',sDummy,'InitialAmount',0,'InitialAmountUnits','nanomole')
addrule(model,'sDummy = compartment1.s1 + compartment1.s2')
2) and then in my sbiofit, do a responseMap as follows to map the sum to my data:
responseMap = {'sDummy = DATA'};
However, I can't even get past step 1. Every time I add my sDummy species to the model and add that rule, it simply zeros out species1 and species2, it's very bizarre.
My questions are:
- Does adding a dummy species work the way I have described above, or is my conception of using addrule to do that wrong to begin with?
- is there a better way altogether to fit my data to a sum of species?
0 件のコメント
採用された回答
Arthur Goldsipe
2018 年 10 月 29 日
I think your idea is reasonable. I believe the problem is with the rule you added. As written, addrule adds an initial assignment rule to the model, which is only evaluated at time=0. If you want the rule to be in effect at all times, then you need to create a repeated assignment rule. You can do that by changing the line of code to the following:
addrule(model,'sDummy = compartment1.s1 + compartment1.s2', 'repeatedAssignment');
If that doesn't solve the problem, let us know here.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Import Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!