Difference between revisions of "WeibullDataSet.ClearDataSet"

From ReliaWiki
Jump to navigation Jump to search
Line 7: Line 7:
 
== Usage Example ==
 
== Usage Example ==
  
{{APIComment|Declare the WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
+
{{APIComment|'Declare a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
        Dim WDS as New WeibullDataSet
+
  Dim WDS as New WeibullDataSet
 
+
 
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure]] for additional details.}}
+
{{APIComment|'Add failure times to the raw data. See [[WeibullDataSet.AddFailure]].}}
        WDS.AddFailure(1, 1)
+
  WDS.AddFailure(1, 1)
        WDS.AddFailure(2, 1)
+
  WDS.AddFailure(2, 1)
        WDS.AddFailure(3, 1)
+
  WDS.AddFailure(3, 1)
 
+
 
{{APIComment|Calculate the Fitted Model using the raw data.}}
+
{{APIComment|'Fit the data to a life distribution.}}
        WDS.CalculateBestFit
+
  WDS.CalculateBestFit
 
+
 
{{APIComment|Use the Fitted Model using the raw data.}}
+
{{APIComment|'Retrieve the fitted distribution model.}}
        Dim WDSFittedModel as cModel
+
  Dim WDSFittedModel as cModel
        WDSFittedModel = WDS.FittedModel
+
  WDSFittedModel = WDS.FittedModel
 
+
 
{{APIComment|Use ClearDataSet to clear data and fitted model.}}
+
  {{APIComment|'Use ClearDataSet to clear data and fitted model.}}      
        '''WDS.ClearDataSet'''
+
  WDS.ClearDataSet
 
 
{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 0.}}
 
        Dim NumberOfFailures as Integer
 
        NumberOfFailures = WDS.FailureCount
 

Revision as of 18:47, 6 May 2014


Clears all data in the data set and removes the fitted model, if any.

Syntax

  • ClearDataSet()

Usage Example

 'Declare a new WeibullDataSet object. See WeibullDataSet. 
 Dim WDS as New WeibullDataSet
 
 'Add failure times to the raw data. See WeibullDataSet.AddFailure. 
 WDS.AddFailure(1, 1)
 WDS.AddFailure(2, 1)
 WDS.AddFailure(3, 1)
 
 'Fit the data to a life distribution. 
 WDS.CalculateBestFit
 
 'Retrieve the fitted distribution model. 
 Dim WDSFittedModel as cModel
 WDSFittedModel = WDS.FittedModel
 
  'Use ClearDataSet to clear data and fitted model.         
 WDS.ClearDataSet