CModel.Pdf: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


== Syntax==
== Syntax==
{{APIName|Pdf}}
*{{APIName|Pdf}}( Time {{APIPrefix|As Double}} , {{APIPrefix|Optional}} CurrentAge {{APIPrefix|As Double}} = 0 , {{APIPrefix|Optional}} DutyCycle {{APIPrefix|As Double}} = 1 ) {{APIPrefix|As Double}}
{{APIName|(}}
{{APIPrefix|ByVal}}
{{APIName|Time}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIPrefix|Optional ByVal}}
{{APIName|CurrentAge}}
{{APIPrefix|As Double}}
=
{{APIName|0,}}
{{APIPrefix|Optional ByVal}}
{{APIName|DutyCycle}}
{{APIPrefix|As Double}}
=
{{APIName|1)}}
{{APIPrefix|As Double}}<br>
{{APIComment|Returns pdf given time.}}


== Parameters ==
Parameters
'''Time'''
:''Time'': The x-value (time) to calculate the y-value from the ''pdf''.
{{APIComment|The time value to calculate PDF.}}
:''CurrentAge'': The current age.
 
:''DutyCycle'': The duty cycle.
'''CurrentAge'''
{{APIComment|The current age.}}
 
'''DutyCycle'''
{{APIComment|The duty cycle.}}


== Usage Example ==
== Usage Example ==

Revision as of 00:04, 7 March 2014


Returns the y-value from the pdf at the specified x-value (time).

Syntax

  • Pdf ( Time As Double , Optional CurrentAge As Double = 0 , Optional DutyCycle As Double = 1 ) As Double

Parameters

Time: The x-value (time) to calculate the y-value from the pdf.
CurrentAge: The current age.
DutyCycle: The duty cycle.

Usage Example

Declare the cModel class using an in-line parameter list.

       Dim newModel As New cModel(ModelTypeEnum.Weibull2, ModelCategoryEnum.Reliability, "NewModel1", 1, 100)

Calculate the PDF at time 100 for the model described in newModel.

       Dim ResultValue as Double
       ResultValue = newModel.Pdf(100)