WeibullDataSet.ClearDataSet: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:APIClass|WeibullDataSet Class|WeibullDataSet}}
{{Template:API}}{{Template:APIBreadcrumb|.[[WeibullDataSet Class|WeibullDataSet]]}}
{{Template:WeibullDataSet.ClearDataSet.Cmt}}
 
 
<onlyinclude>Clears all data in the data set and removes the fitted model, if any. </onlyinclude>


== Syntax  ==
== Syntax  ==
*ClearDataSet()
'''.ClearDataSet'''


== Usage Example ==
== Example ==
'''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|'Declare a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
'''VB.NET'''
  Dim WDS as New WeibullDataSet
 
  {{APIComment|'Declare a new WeibullDataSet object.}}  
{{APIComment|'Add failure times to the raw data. See [[WeibullDataSet.AddFailure]].}}
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
  WDS.AddFailure(1, 1)
  WDS.AddFailure(2, 1)
  WDS.AddFailure(3, 1)
    
    
{{APIComment|'Add the failure times 10, 20 and 30 to the data set.}}
  WDS.AddFailure(10, 1)
  WDS.AddFailure(20, 1)
  WDS.AddFailure(30, 1)
 
  {{APIComment|'Fit the data to a life distribution.}}
  {{APIComment|'Fit the data to a life distribution.}}
  WDS.CalculateBestFit
  WDS.CalculateBestFit
    
    
  {{APIComment|'Retrieve the fitted distribution model.}}
  {{APIComment|'Retrieve the fitted distribution model.}}
  Dim WDSFittedModel as cModel
  {{APIPrefix|Dim}} WDSFittedModel {{APIPrefix|as}} cModel
  WDSFittedModel = WDS.FittedModel
  WDSFittedModel = WDS.FittedModel
    
    
  {{APIComment|'Use ClearDataSet to clear data and fitted model.}}         
{{APIComment|'Clear the data set and fitted model.}}         
  WDS.ClearDataSet
  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