Info
此问题已关闭。 请重新打开它进行编辑或回答。
Use integrated data to define rules in SimBiology Toolbox
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I want to try the following thing, define a model, integrate some data and define a rule how to use the data to change parameters.
This is how I can currently access to data:
Mobj = sbiomodel('testmodel');
cell=addcompartment(Mobj,'cell',1,'ConstantCapacity',0,'UserData',data);
addrule(Mobj,'cell=myInterpolation(''cell'',time)', 'repeatedAssignment');
The function myInterpolation then opens a mat file where it accesses the right data, does the interpolation according to the actual time point and handles back the new cell volume.
It would be much easier to link the data to the model and access it, however I don't know how to call the linked data in the addrule function.
Thx!
0 个评论
回答(2 个)
Pramod Kumar
2011-11-15
Hi Sebastian,
There is no elegant way to store data on the model and be able to access it in a function that is used in a rule.
If the data is not too big you can hard code it in the rule function. to see an example look at insulindemo.m. This demo uses functions EndogenousGlucoseProduction and GlucoseAppearanceRate in repeated assignment rules. each of these functions have the data hard coded. They do an interpolation to compute the data at a given time point.
0 个评论
此问题已关闭。
社区
更多回答在 SimBiology Community
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!