Contenido principal

addReplicates

R2026b

Add replicates to design of experiments (DOE) object

Since R2026b

    Description

    dobj = addReplicates(dobj,numreps) adds numreps replicates to the design of experiments (DOE) object dobj. A replicate is a duplicate of the original runs in the object when it is created.

    example

    Examples

    collapse all

    Create a fractional factorial design with three factors and resolution III.

    fracdoe = fractionalFactorialDOE(3,Resolution=3)
    fracdoe = 
      fractionalFactorialDOE with properties:
    
                    Design: [4×3 table]
          StandardRunOrder: [4×1 double]
        ModelSpecification: "1 + Factor1 + Factor2 + Factor3"
                    Levels: {[-1 1]  [-1 1]  [-1 1]}
        CategoricalFactors: []
                Resolution: 3
        ConfoundingPattern: [3×2 table]
              IsRandomized: 0
             NumReplicates: 0
    
    

    fracdoe is a fractionalFactorialDOE object that contains a design with four runs. Display the runs in the design.

    fracdoe.Design
    ans = 4×3 table
        Factor1    Factor2    Factor3
        _______    _______    _______
    
          -1         -1          1   
          -1          1         -1   
           1         -1         -1   
           1          1          1   
    
    

    Add two replicates to the design, and display the runs.

    fracdoe = addReplicates(fracdoe,2);
    fracdoe.Design
    ans = 12×3 table
        Factor1    Factor2    Factor3
        _______    _______    _______
    
          -1         -1          1   
          -1          1         -1   
           1         -1         -1   
           1          1          1   
          -1         -1          1   
          -1          1         -1   
           1         -1         -1   
           1          1          1   
          -1         -1          1   
          -1          1         -1   
           1         -1         -1   
           1          1          1   
    
    

    fracdoe contains the original runs and two copies of the original runs.

    Input Arguments

    collapse all

    Experiment design, specified as one of the following DOE objects: fullFactorialDOE, fractionalFactorialDOE, mixtureDOE, optimalDOE, responseSurfaceDOE, or taguchiDOE.

    Number of replicates, specified as a positive integer.

    Output Arguments

    collapse all

    Augmented design, returned as a DOE object of the same type as the input design dobj. The augmented design contains the original runs in the input design and k replicates, where k equals the number of replicates in the input design plus numreps. The function sets the NumReplicates property of the augmented design object equal to k.

    In some cases after object creation, a fullFactorialDOE object contains a set of runs and a replicate of those runs. In this case, the addReplicates function duplicates only the original (nonreplicate) runs.

    When you add runs to an optimalDOE object using the addruns function, and then add a replicate using addReplicates, the software does not include the added runs in the replicate.

    If the input design dobj has a randomized run order (dobj.IsRandomized = 1), the function randomizes the run order of the augmented design.

    Version History

    Introduced in R2026b