Main Content

resolve

Compare parameter set differences and output resolved parameter set object

Since R2023b

Description

paramSetResolve = resolve(paramSet1,paramSet2,compResult) identifies differences between parameter set 1 and parameter set 2 and generates an output parameter set 3. You can export the output resolved parameter set to the model or real-time application from which you imported parameter set 1. By exporting the resolved parameter set into the model or real-time application, you update the model or real-time application with the resolved parameter values.

example

Examples

collapse all

Use the resolve function to compare two ParameterSet objects. This example continues from the Compare Parameter Set Objects example for the compare function.

  1. Using the ParameterSet objects and output structure from the Compare Parameter Set Objects example, create a resolved ParameterSet object.

    paramSetNameRes = resolve(ParamSetObjOrig,ParamSetObjMod,compResultAmp)
    paramSetNameRes = 
    
      ParameterSet with properties:
    
        filename: ''
  2. Use the exportToModel function to export the resolved parameter set to the model.

    exportToModel(paramSetNameRes,'slrt_ex_osc_outport');

Input Arguments

collapse all

The paramSet1 argument specifies the first ParameterSet object for the comparison.

Example: ParamSetObjOrig

The paramSet2 argument specifies the second ParameterSet object for the comparison.

Example: ParamSetObjMod

The compResult argument specifies an output structure name for the comparison results. The returned structure has these fields:

  • BlockPath — Parameter block path

  • Name — Parameter name

  • DataType — Parameter data type

  • Size — Parameter data size

  • PS1 name — Parameter set 1 name

  • PS2 name — Parameter set 2 name

  • Type — For a specific parameter, the Type field value can be "Modification" if the parameter set 1 and parameter set 2 have different values at this parameter, "Insertion" if the parameter exists in ps2 but does not exist in ps1), or "Deletion" if the parameter exists in ps1 but does not exist in ps2.

Output Arguments

collapse all

The paramSetResolve argument specifies the output resolved ParameterSet object. You can use the exportToModel function to export the resolved parameter set to the model. If your set the filename field for the resolved ParameterSet object, you can use the exportParamSet function to create a parameter set file from the object then use the loadParamSet function to load the parameters into a specified real-time application.

Example: ParamSetObjOrig

Version History

Introduced in R2023b