Main Content

summary

Return or plot condition variable distribution in an ensemble datastore

Since R2024a

Description

example

cvdist = summary(ens,ConditionVariable=cv) returns a table cvdist that contains the distribution of the values, or classes, of the condition variable cv for the ensemble datastore ens.

example

summary(ens,ConditionVariable=cv) plots a histogram of the distribution of cv values.

Examples

collapse all

Load the data pEnsemble, which is a workspace ensemble that contains pump diagnostic information.

load pumpWEnsemble.mat pEnsemble
pEnsemble
pEnsemble = 
  workspaceEnsemble with properties:

           DataVariables: [2x1 string]
    IndependentVariables: [0x0 string]
      ConditionVariables: "faultCode"
       SelectedVariables: [3x1 string]
                ReadSize: 1
              NumMembers: 240
          LastMemberRead: "Member 240"

pEnsemble includes the condition variable "faultCode", which indicates whether an ensemble member is healthy or contains one, two, or three specific fault types. For example, a value of 0 indicates that no fault is present. A value of 101 indicates that two faults are present. There are eight possible values.

Determine how the members of the ensemble are distributed over the set of fault codes, or classes.

dist = summary(pEnsemble,ConditionVariable="faultCode")
dist=8×2 table
    Classes    Counts
    _______    ______

      0          42  
      1          27  
      10         41  
      11         17  
      100        40  
      101        24  
      110        32  
      111        17  

The largest class is the healthy set, with a fault code of 0. The smallest classes have multiple faults.

Plot the distribution.

summary(pEnsemble,ConditionVariable="faultCode")

The histogram displays the size of each class.

Input Arguments

collapse all

Ensemble datastore, specified as a fileEnsembleDatastore, simulationEnsembleDatastore, or workspaceEnsemble object that contains at least one condition variable.

Condition variable name contained in ens, specified as a string or a character array.

Output Arguments

collapse all

Distribution of condition values corresponding to each class in cv.

Version History

Introduced in R2024a