WAPlots.AddDataset: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:APIClass|WAPlots Class|WAPlots}}
{{Template:API}}{{Template:APIBreadcrumb|.[[WAPlots_Class|WAPlots]]}}
Add a [[WeibullDataSet Class|WeibullDataSet]] or [[ALTADataSet Class|ALTADataSet]] to the WAPlot Class.


== Weibull Method Syntax ==
{{APIName|AddDataSet(}}
{{APIPrefix|ByVal}}
{{APIName|DataSet}}
{{APIPrefix|As}}
{{APIName|[[WeibullDataSet Class|WeibullDataSet]] )}}


{{APIComment|Adds Weibull data set for subsequent plotting.}}
<onlyinclude>Adds a [[WeibullDataSet Class|WeibullDataSet]] or [[ALTADataSet Class|ALTADataSet]] object to the plot.</onlyinclude>


== ALTA Method Syntax ==
{{APIName|AddDataSet(}}
{{APIPrefix|ByVal}}
{{APIName|DataSet}}
{{APIPrefix|As}}
{{APIName|[[ALTADataSet Class|ALTADataSet]] )}}


{{APIComment|Adds ALTA data set for subsequent plotting.}}
'''Remarks''': Before adding the <code>WeibullDataSet</code> object to the plot, it must first be analyzed by using the [[WeibullDataSet.Calculate]] method; otherwise, the plot cannot be generated. Similarly, the <code>ALTADataSet</code> object must first be analyzed using the [[ALTADataSet.Calculate]] method.  


== Parameters ==
== Syntax ==
'''DataSet'''
'''.AddDataSet'''(''DataSet'')
The variable name of the WeibullDataSet or ALTADataSet object to add to the collection.


== Usage Example ==
===Parameters===
{{APIComment|Create a new Weibull/ALTA Plot instance.}}
''DataSet''
        Dim WeibullALTAPlot As New WAPlots
:Required. The [[WeibullDataSet Class|WeibullDataSet]] or [[ALTADataSet Class|ALTADataSet]] object that the plot will be based on.  


{{APIComment|Declare a WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
== Example ==
        Dim WDS as New WeibullDataSet


{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]] for additional details.}}
'''VBA'''
        WDS.AddFailure(1, 1)
        WDS.AddFailure(2, 1)
{{APIComment|'Declare a WeibullDataSet object.}}
        WDS.AddFailure(3, 1)
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
{{APIComment|'Add failures to the data set.}}
  {{APIPrefix|Call}} WDS.AddFailure(1, 1)
  {{APIPrefix|Call}} WDS.AddFailure(2, 1)
  {{APIPrefix|Call}} WDS.AddFailure(3, 1)
{{APIComment|'Analyze the data set.}} 
  {{APIPrefix|Call}} WDS.Calculate
{{APIComment|'Declare a new WAPlots object.}}
  {{APIPrefix|Dim}} WeibullALTAPlot {{APIPrefix|As New}} WAPlots
{{APIComment|'Add the data set to the plot.}}
  WeibullALTAPlot.AddDataset(WDS)


{{APIComment|Add the WeibullDataSet to the WAPlots.}}
'''VB.NET'''
        '''WeibullALTAPlot.AddDataset(WDS)'''
{{APIComment|'Declare a WeibullDataSet object.}}
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
{{APIComment|'Add failures to the data set.}}
  WDS.AddFailure(1, 1)
  WDS.AddFailure(2, 1)
  WDS.AddFailure(3, 1)
 
{{APIComment|'Analyze the data set.}} 
  WDS.Calculate
{{APIComment|'Declare a new WAPlots object.}}
  {{APIPrefix|Dim}} WeibullALTAPlot {{APIPrefix|As New}} WAPlots
{{APIComment|'Add the data set to the plot.}}
  WeibullALTAPlot.AddDataset(WDS)

Latest revision as of 00:56, 7 September 2016

APIWiki.png


Member of: SynthesisAPI.WAPlots


Adds a WeibullDataSet or ALTADataSet object to the plot.


Remarks: Before adding the WeibullDataSet object to the plot, it must first be analyzed by using the WeibullDataSet.Calculate method; otherwise, the plot cannot be generated. Similarly, the ALTADataSet object must first be analyzed using the ALTADataSet.Calculate method.

Syntax

.AddDataSet(DataSet)

Parameters

DataSet

Required. The WeibullDataSet or ALTADataSet object that the plot will be based on.

Example

VBA

 'Declare a WeibullDataSet object. 
  Dim WDS As New WeibullDataSet
 
 'Add failures to the data set. 
  Call WDS.AddFailure(1, 1)
  Call WDS.AddFailure(2, 1)
  Call WDS.AddFailure(3, 1)

 'Analyze the data set.   
  Call WDS.Calculate

 'Declare a new WAPlots object. 
  Dim WeibullALTAPlot As New WAPlots

 'Add the data set to the plot. 
  WeibullALTAPlot.AddDataset(WDS)
VB.NET

 'Declare a WeibullDataSet object. 
  Dim WDS As New WeibullDataSet
 
 'Add failures to the data set. 
  WDS.AddFailure(1, 1)
  WDS.AddFailure(2, 1)
  WDS.AddFailure(3, 1)
  
 'Analyze the data set.   
  WDS.Calculate

 'Declare a new WAPlots object. 
  Dim WeibullALTAPlot As New WAPlots

 'Add the data set to the plot. 
  WeibullALTAPlot.AddDataset(WDS)