SimBiology.DiffResults
Description
SimBiology.DiffResults contains the results from comparing two
      SimBiology models and diagram information.
Creation
Use sbiodiff to
      compare the models and the function returns SimBiology.DiffResults as an
      output.
Properties
Results of comparison between two SimBiology models and their diagrams, specified as a table.
The table has the following columns:
- Class — Model component type specified as a string. Note that for a variant, the table shows - "Variant (X)", where X is the string- "species",- "compartment", or- "parameter"depending on the type of the component referenced in the corresponding row of the variant content. For details on how SimBiology matches variants, see Doses and Variants.
- Source — Source component name. - For a species, parameter, or compartment, the column shows a qualified name (such as - cell.Ligand).
- For a kinetic law, it shows - "Kinetic Law (Y)", where Y is the parent reaction name.
- For a rule, it shows the rule name. If the name is empty, it shows the value of the Rule property instead. 
- For an event, it shows the event name. If the name is empty, it shows the value of the Trigger property instead. 
- For a reaction, observable, dose, or variant, it shows the value of the Name property. 
 
- Target — Target component name (see the Source column for details) 
- Property — Name of the component property for which the value is shown in the SourceValue and TargetValue column. 
- SourceValue — Value of the corresponding property of the source component 
- TargetValue — Value of the corresponding property of the target component 
 The Property, SourceValue, and
              TargetValue show <missing> as the value for
            any deleted or inserted model component.
Tip
The Class, Source, Target, and Property columns contain strings. You can use these columns to select specific changes by using string comparisons. For instance, to get all modifications to the value of any parameter from the table, use:
diffResults = sbiodiff(m1,m2); diffTbl = diffResults.Comparisons; param_subset = diffTbl(diffTbl.Class == "Parameter" & diffTbl.Property == "Value",:);
To find <missing> values, use ismissing.
Data Types: table
Source model information, specified as a structure. The structure contains the following fields.
- Project— Name of the SBPROJ file that contains the source model. If you specify the corresponding model as a SimBiology model object, this field value is- "".
- ModelName— SimBiology model name
- Model— SimBiology model object
- LastModified— Last modified date of the SBPROJ file. If you specify the corresponding model as a SimBiology model object, this field value is- "".
Data Types: struct
Target model information, specified as a structure. The structure contains the following fields.
- Project— Name of the SBPROJ file that contains the target model. If you specify the corresponding model as a SimBiology model object, this field value is- "".
- ModelName— SimBiology model name
- Model— SimBiology model object
- LastModified— Last modified date of the SBPROJ file. If you specify the corresponding model as a SimBiology model object, this field value is- "".
Data Types: struct
Object Functions
| getComponents | Get model components associated with SimBiology model comparison results | 
| visdiff | Visualize SimBiology model comparison results | 
Examples
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}
Version History
Introduced in R2022a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)