Ross Kelly in MATLAB Answers
上次活动时间: 2022-8-3

I can fit to individual dose data using pooled fiting or mixed effects no problem. However, for some compounds I have multiple doses and I wish to fit to these simultaneously to obtain a single parameter set. %% PREPARE MODEL gData = groupedData(data); gData.Properties.IndependentVariableName = 'Var1'; gData.Properties.GroupVariableName = 'Var3'; gData.Properties.VariableUnits = {'hour','nanogram/milliliter','',''}; gData.Properties; % One-Compartment Extravascular pkmd = PKModelDesign; pkc1 = addCompartment(pkmd,'Central'); pkc1.DosingType = 'FirstOrder'; pkc1.EliminationType = 'linear-clearance'; pkc1.HasResponseVariable = true; model = construct(pkmd); configset = getconfigset(model); configset.CompileOptions.UnitConversion = true; % Single dose dose = sbiodose('dose'); dose.TargetName = 'Dose_Central'; dose.StartTime = 0; dose.Amount = 75; dose.AmountUnits = 'milligram'; dose.TimeUnits = 'hour'; responseMap = {'Drug_Central = Var2'}; % Use NCA parameter estimates as initial parameter guess NCA.Central = mean(ncaparameters.V_z,'omitnan'); NCA.CL = mean(ncaparameters.CL,'omitnan'); NCA.ka = 1; paramsToEstimate = {'log(Central)','log(Cl_Central)','log(ka_Central)'}; % estimatedParams = estimatedInfo(paramsToEstimate,'InitialValue',[5e-4 1e-6 1],'Bounds',[1 5;0.5 2; 1e-3 10]); estimatedParams = estimatedInfo(paramsToEstimate,'InitialValue',[NCA.Central NCA.CL NCA.ka]); % Fit [Individual, Pooled, Mixed Effects] fitConst = sbiofit(model,gData,responseMap,estimatedParams,dose); pooledFit = sbiofit(model,gData,responseMap,estimatedParams,dose,'Pooled',true); Here is my code for 1 dose. The multiple dose data is in a table similar to the tutorial for phenobarbital, where the next dose and corresponding data follows the previous dose. I wish to do this using PK models and the sbiofit or similar commands that utilise simbiology. Please can someone shed some light on this? Cheers
Oscar Ortega in MATLAB Answers
上次活动时间: 2022-7-13

Is it possible to add programmatically (using command line) add a program to a simbiology model? I would like to add a program to the model so when it is saved with sbiosaveproject command and then the project is opened in the simbiology App it recognizes the program automatically. Thank you
Yash Jawale in MATLAB Answers
上次活动时间: 2019-8-19

I have a model built in SimBiology, it works in SimBio GUI i.e. runs without error and live plots. But when I tried running same model with MATLAB command line it's giving empty result. sbioloadproject('model.sbproj') [time, x, names] = sbiosimulate(m1); time, x, names are empty variables. My quick analysis of problem, In SimBio GUI I have set the AbsoluteToleranceStepSize to 1e-5, but that I cannot verify with getconfigset(m1) on command line/script. Since run fails in SimBio GUI if that value is set to default []. Is there a way to set it in command line also, if that's the issue.
Rory Conolly in MATLAB Answers
上次活动时间: 2018-3-5

I have an existing simbiology model that I want to control from the MATLAB command line. The documentation that I can find talks about creating new simbiology models from the MATLAB command line, but not about controlling an existing model. Help will be appreciated!
Ciaran in MATLAB Answers
上次活动时间: 2015-1-13

Is there any way to import a SMBL using SimBiology (either code or GUI) then automatically produce the code for that model in script form. My aim here is to be able to import an SBML that I made using CellDesigner and simulate multiple times with randomly generated initial values (something that seems hard to do with the GUI alone). Thanks