Main Content

initopspec

Initialize operating point specification values

    Description

    opspecNew = initopspec(opspec,op) updates the operating point specification opspec with the values in the operating point op and returns a new operating point specification.

    example

    opspecNew = initopspec(opspec,x) updates the operating point specification using the state values in the vector x.

    opspecNew = initopspec(opspec,x,u) updates the operating point specification using the state and input values in the vectors x and u, respectively.

    opspecNew = initopspec(opspec,xstruct) updates the operating point specification using the state values in the structure xstruct. You can use this syntax if your operating point specification does not have input values.

    opspecNew = initopspec(opspec,xstruct,u) updates the operating point specification using the state and input values in the structure xstruct and vector u, respectively.

    Examples

    collapse all

    Find an operating point for the model using a simulation snapshot.

    mdl = 'scdplane';
    op = findop(mdl,10);

    Create an operating point specification for your model.

    opspec = operspec(mdl);

    Update the operating point specification using the computed operating point values.

    newopspec = initopspec(opspec,op);

    Input Arguments

    collapse all

    Operating point specification for a Simulink® model, specified as an OperatingSpec object. To create an OperatingSpec object for your model, use the operspec function.

    Operating point for a Simulink model, specified as an OperatingPoint, OperatingSpec, or OperatingReport object.

    State values, specified as vector. The order of values in x must match the state order in opspec.

    You can create x using getxu.

    Input values, specified as a vector. The order of values in u must match the state order in opspec.

    You can create u using getxu.

    State information, specified as a structure. Create xstruct using getstatestruct.

    Output Arguments

    collapse all

    Updated operating point specification, returned as an OperatingSpec object.

    Alternatives

    As an alternative to the initopspec function, initialize operating point specification values in the Model Linearizer app. For more information, see Import and Export Specifications and Initial Values for Operating Point Search.

    Version History

    Introduced before R2006a