主要内容

CreateBoundary

Create boundary model

    Description

    BndMdl = CreateBoundary(Type,Inputs) is a static namespace function that creates an mbcboundary.Model object of the specified Type. Use this syntax to create a new boundary model object independent of any project. See fit for alternatives.

    example

    BndMdl = CreateBoundary(Type,Inputs,Property,Value,...) creates a boundary with the specified properties.

    BndMdl = CreateBoundary(Tree) creates a new boundary model, BndMdl, from the mbcboundary.Tree object, Tree. The method uses the test plan inputs to define the boundary model inputs. You must call Add to add the new model to the tree.

    BndMdl = CreateBoundary(Tree,Type) creates a new boundary model of the specified Type.

    example

    BndMdl = CreateBoundary(Tree,Type,Property,Value,...) creates a boundary with the specified properties.

    NewBndMdl = CreateBoundary(OrgBndMdl,Type) creates a new boundary model with the same inputs as the current boundary model, OrgBndMdl.

    NewBndMdl = CreateBoundary(OrgBndMdl,Type,Property,Value,...) creates a new boundary model with the specified properties.

    Examples

    collapse all

    You can create a boundary model outside of a project in either of these ways.

    B = mbcboundary.Fit(Data,Type);
    B = mbcboundary.CreateBoundary(Type,Inputs)

    Create a new boundary model, B, from the mbcboundary.Tree object, Tree. The method uses the test plan inputs to define the boundary model inputs.

    Tree = testplan.Boundary
    B = CreateBoundary(Tree)

    Create a star-shaped global boundary model for a test plan.

    B = CreateBoundary(testplan.Boundary.Global,'Star-shaped');

    Add the boundary model to the test plan. Fit the boundary model. The best boundary model for the tree includes this boundary model.

    B = Add(testplan.Boundary.Global,B);

    Create boundary models for a point-by-point test plan.

    B = TP.Boundary.Local.CreateBoundary('Point-by-point');
    % Use convex hull type for the local boundaries
    B.LocalModel = CreateBoundary(B.LocalModel,'Convex hull');
    % Add point-by-point boundary model to project.
    TP.Boundary.Local.Add(B);
    

    Creates a point-by-point boundary model from the local boundary tree.

    B = CreateBoundary(T.Boundary.Local,'Point-by-point');

    Create a local boundary with type Range.

    B.LocalModel = (B.LocalModel,'Range');

    Input Arguments

    collapse all

    Type of boundary model, specified as a character vector. Type is a property of the mbcboundary.AbstractBoundary class and all subclasses.

    B.Type returns the boundary model type.

    Use the getAlternativeTypes method to find out what types are available for the specified boundary model.

    Available types depend on the boundary model.

    • For mbcboundary.TwoStage, the LocalModel requires a type of either Range or Ellipsoid. GlobalModel requires a type of Interpolating RBF only.

    • For mbcboundary.PointByPoint, the LocalModel type can be any valid type for mbcboundary.Model.

    Note

    You can only create boundaries of type 'Point-by-point' or 'Two-stage' from a local boundary tree or from an existing boundary of type 'Point-by-point' or 'Two-stage'. You cannot create or fit these types of boundary models outside of a project. Fit them by adding the boundary model to the boundary tree. See example below.

    Model input, specified as an mbcmodel.modelinput object.

    Instance of mbcboundary.Tree class object, specified as an mbcboundary.Tree object.

    Data Types: char | string

    Boundary model property name, specified as a character vector. The allowed values depend on the boundary model type.

    Example: Global,'Star-shaped'

    Boundary model, specified as a boundary model object.

    Data Types: char | string

    Output Arguments

    collapse all

    Boundary model object created by CreateBoundary, returned as a boundary model object.

    Data Types: char | string

    New boundary model object created by CreateBoundary, returned as a boundary model object.

    Data Types: char | string

    Version History

    Introduced in R2009b