Difference between revisions of "WeibullDataSet.ClearDataSet"

From ReliaWiki
Jump to navigation Jump to search
m (Protected "WeibullDataSet.ClearDataSet" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading])
m
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:APIClass|WeibullDataSet Class|WeibullDataSet}}
+
{{Template:API}}{{Template:APIBreadcrumb|.[[WeibullDataSet Class|WeibullDataSet]]}}
  
Provides a method to clear the raw data entered into the WeibullDataSet.
 
  
== Method Syntax  ==
+
<onlyinclude>Clears all data in the data set and removes the fitted model, if any. </onlyinclude>
{{APIName|ClearDataSet()}}<br>
 
{{APIComment|Clears all data and fitted model. All analysis settings stay unchanged.}}
 
  
== Usage Example ==
+
== Syntax  ==
 +
'''.ClearDataSet'''
  
{{APIComment|Declare the WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
+
== Example ==
        Dim WDS as New WeibullDataSet
+
'''VBA'''
 +
 +
{{APIComment|'Declare a new WeibullDataSet object.}}
 +
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 +
 
 +
{{APIComment|'Add the failure times 10, 20 and 30 to the data set.}}
 +
  {{APIPrefix|Call}} WDS.AddFailure(10, 1)
 +
  {{APIPrefix|Call}} WDS.AddFailure(20, 1)
 +
  {{APIPrefix|Call}} WDS.AddFailure(30, 1)
 +
 
 +
{{APIComment|'Fit the data to a life distribution.}}
 +
  WDS.CalculateBestFit
 +
 
 +
{{APIComment|'Retrieve the fitted distribution model.}}
 +
  {{APIPrefix|Dim}} WDSFittedModel {{APIPrefix|as}} cModel
 +
  {{APIPrefix|Set}} WDSFittedModel = WDS.FittedModel
 +
 
 +
{{APIComment|'Clear the data set and fitted model.}}       
 +
  WDS.ClearDataSet
  
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure]] for additional details.}}
+
'''VB.NET'''
        WDS.AddFailure(1, 1)
+
        WDS.AddFailure(2, 1)
+
{{APIComment|'Declare a new WeibullDataSet object.}}
        WDS.AddFailure(3, 1)
+
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
+
 
{{APIComment|Calculate the Fitted Model using the raw data.}}
+
{{APIComment|'Add the failure times 10, 20 and 30 to the data set.}}  
        WDS.CalculateBestFit
+
  WDS.AddFailure(10, 1)
 
+
  WDS.AddFailure(20, 1)
{{APIComment|Use the Fitted Model using the raw data.}}
+
  WDS.AddFailure(30, 1)
        Dim WDSFittedModel as cModel
+
 
        WDSFittedModel = WDS.FittedModel
+
{{APIComment|'Fit the data to a life distribution.}}
 
+
  WDS.CalculateBestFit
{{APIComment|Use ClearDataSet to clear data and fitted model.}}
+
 
        '''WDS.ClearDataSet'''
+
{{APIComment|'Retrieve the fitted distribution model.}}
 
+
  {{APIPrefix|Dim}} WDSFittedModel {{APIPrefix|as}} cModel
{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 0.}}
+
  WDSFittedModel = WDS.FittedModel
        Dim NumberOfFailures as Integer
+
 
        NumberOfFailures = WDS.FailureCount
+
{{APIComment|'Clear the data set and fitted model.}}      
 +
  WDS.ClearDataSet

Latest revision as of 17:40, 19 April 2016

APIWiki.png


Member of: SynthesisAPI.WeibullDataSet


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

Syntax

.ClearDataSet

Example

VBA

 'Declare a new WeibullDataSet object.  
  Dim WDS As New WeibullDataSet
 
 'Add the failure times 10, 20 and 30 to the data set.  
  Call WDS.AddFailure(10, 1)
  Call WDS.AddFailure(20, 1)
  Call WDS.AddFailure(30, 1)
  
 'Fit the data to a life distribution. 
  WDS.CalculateBestFit
 
 'Retrieve the fitted distribution model. 
  Dim WDSFittedModel as cModel
  Set WDSFittedModel = WDS.FittedModel
 
 'Clear the data set and fitted model.         
  WDS.ClearDataSet
VB.NET

 'Declare a new WeibullDataSet object.  
  Dim WDS As New WeibullDataSet
 
 'Add the failure times 10, 20 and 30 to the data set.  
  WDS.AddFailure(10, 1)
  WDS.AddFailure(20, 1)
  WDS.AddFailure(30, 1)
  
 'Fit the data to a life distribution. 
  WDS.CalculateBestFit
 
 'Retrieve the fitted distribution model. 
  Dim WDSFittedModel as cModel
  WDSFittedModel = WDS.FittedModel
 
 'Clear the data set and fitted model.         
  WDS.ClearDataSet