Main Content

visdiff

Visualize SimBiology model comparison results

Since R2022a

Description

example

visdiff(diffResults) opens the Comparison tool and shows the comparison results diffResults of SimBiology models.

Tip

Alternatively, you can also use two SBPROJ files as inputs. For details, see Compare Models in Comparison Tool.

Examples

collapse all

Load a source model.

model1      = sbmlimport("lotka");
y1          = sbioselect(model1, "Type", "species", "Name", "y1");
y1.Value    = 880;

Load a target model to compare against the source model.

model2      = sbmlimport("lotka");
y1          = sbioselect(model2, "Type", "species", "Name", "y1");
y1.Value    = 920;

Compare the models using sbiodiff and display the comparison table.

diffResults = sbiodiff(model1,model2);
diffTable   = diffResults.Comparisons
diffTable=1×6 table
           Class      Source    Target    Property    SourceValue    TargetValue
         _________    ______    ______    ________    ___________    ___________

    1    "Species"     "y1"      "y1"     "Value"       {[880]}        {[920]}  

You can also view the comparison results graphically in the Comparison tool.

visdiff(diffResults);

Get a table of model components associated with the changes reported in the comparison table.

tbl = getComponents(diffResults)
tbl=1×2 table
                  Source                      Target         
         ________________________    ________________________

    1    {1×1 SimBiology.Species}    {1×1 SimBiology.Species}

Input Arguments

collapse all

Model comparison results, specified as a SimBiology.DiffResults object. Use sbiodiff to generate this object.

Version History

Introduced in R2022a