This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simulate Model of Glucose-Insulin Response with Different Initial Conditions

This example shows how to simulate the glucose-insulin responses for the normal and diabetic subjects.

Load the model of glucose-insulin response. For details about the model, see the Background section in Simulating the Glucose-Insulin Response.

sbioloadproject('insulindemo', 'm1')

The model contains different initial conditions stored in various variants.

variants = getvariant(m1);

Get the initial conditions for the type 2 diabetic patient.

type2 = variants(1)
   SimBiology Variant - Type 2 diabetic (inactive)

   ContentIndex:     Type:        Name:             Property:           Value:
   1                 parameter    Plasma Volume ... Value               1.49
   2                 parameter    k1                Value               0.042
   3                 parameter    k2                Value               0.071
   4                 parameter    Plasma Volume ... Value               0.04
   5                 parameter    m1                Value               0.379
   6                 parameter    m2                Value               0.673
   7                 parameter    m4                Value               0.269
   8                 parameter    m5                Value               0.0526
   9                 parameter    m6                Value               0.8118
   10                parameter    Hepatic Extrac... Value               0.6
   11                parameter    kmax              Value               0.0465
   12                parameter    kmin              Value               0.0076
   13                parameter    kabs              Value               0.023
   14                parameter    kgri              Value               0.0465
   15                parameter    f                 Value               0.9
   16                parameter    a                 Value               6e-05
   17                parameter    b                 Value               0.68
   18                parameter    c                 Value               0.00023
   19                parameter    d                 Value               0.09
   20                parameter    Stomach Glu Af... Value               125
   21                parameter    kp1               Value               3.09
   22                parameter    kp2               Value               0.0007
   23                parameter    kp3               Value               0.005
   24                parameter    kp4               Value               0.0786
   25                parameter    ki                Value               0.0066
   26                parameter    [Ins Ind Glu U... Value               1
   27                parameter    Vm0               Value               4.65
   28                parameter    Vmx               Value               0.034
   29                parameter    Km                Value               466.21
   30                parameter    p2U               Value               0.084
   31                parameter    K                 Value               0.99
   32                parameter    alpha             Value               0.013
   33                parameter    beta              Value               0.05
   34                parameter    gamma             Value               0.5
   35                parameter    ke1               Value               0.0007
   36                parameter    ke2               Value               269
   37                parameter    Basal Plasma G... Value               164.18
   38                parameter    Basal Plasma I... Value               54.81

Suppress an informational warning that is issued during simulations.

warnSettings = warning('off','SimBiology:DimAnalysisNotDone_MatlabFcn_Dimensionless');

Create SimFunction objects to simulate the glucose-insulin response for the normal and diabetic subjects.

  • Specify an empty array {} for the second input argument to denote that the model will be simulated using the base parameter values (that is, no parameter scanning will be performed).

  • Specify the plasma glucose and insulin concentrations as responses (outputs of the function to be plotted).

  • Specify the species Dose as the dosed species. This species represents the initial concentration of glucose at the start of the simulation.

normSim = createSimFunction(m1,{},...
             {'[Plasma Glu Conc]','[Plasma Ins Conc]'},'Dose')
normSim = 



           Name              Type               Units        
    ___________________    _________    _____________________

    '[Plasma Glu Conc]'    'species'    'milligram/deciliter'
    '[Plasma Ins Conc]'    'species'    'picomole/liter'     


    TargetName      TargetDimension  
    __________    ___________________

      'Dose'      'Mass (e.g., gram)'

For the diabetic patient, specify the initial conditions using the variant type2.

diabSim = createSimFunction(m1,{},...
             {'[Plasma Glu Conc]','[Plasma Ins Conc]'},'Dose',type2)
diabSim = 



           Name              Type               Units        
    ___________________    _________    _____________________

    '[Plasma Glu Conc]'    'species'    'milligram/deciliter'
    '[Plasma Ins Conc]'    'species'    'picomole/liter'     


    TargetName      TargetDimension  
    __________    ___________________

      'Dose'      'Mass (e.g., gram)'

Select a dose that represents a single meal of 78 grams of glucose at the start of the simulation.

singleMeal = sbioselect(m1,'Name','Single Meal');

Convert the dosing information to the table format.

mealTable  = getTable(singleMeal);

Simulate the glucose-insulin response for a normal subject for 24 hours.


Simulate the glucose-insulin response for a diabetic subject for 24 hours.


Perform a scan using variants

Suppose you want to perform a parameter scan using an array of variants that contain different initial conditions for different insulin impairments. For example, the model m1 has variants that correspond to the low insulin sensitivity and high insulin sensitivity. You can simulate the model for both conditions via a single call to the SimFunction object.

Select the variants to scan.

varToScan = sbioselect(m1,'Name',...
                    {'Low insulin sensitivity','High insulin sensitivity'});

Check which model parameters are being stored in each variant.

   SimBiology Variant - Low insulin sensitivity (inactive)

   ContentIndex:     Type:        Name:             Property:           Value:
   1                 parameter    Vmx               Value               0.0235
   2                 parameter    kp3               Value               0.0045
   SimBiology Variant - High insulin sensitivity (inactive)

   ContentIndex:     Type:        Name:             Property:           Value:
   1                 parameter    Vmx               Value               0.094
   2                 parameter    kp3               Value               0.018

Both variants store alternate values for Vmx and kp3 parameters. You need to specify them as input parameters when you create a SimFunction object.

Create a SimFunction object to scan the variants.

variantScan = createSimFunction(m1,{'Vmx','kp3'},...
          {'[Plasma Glu Conc]','[Plasma Ins Conc]'},'Dose');

Simulate the model and plot the results. Run 1 include simulation results for the low insulin sensitivity and Run 2 for the high insulin sensitivity.


Low insulin sensitivity lead to increased and prolonged plasma glucose concentration.

Restore warning settings.