Main Content

distfcn

Distribution functions of accelerated life model

Since R2026a

Description

fx = distfcn(mdl) returns the Survivor Function values fx of the AcceleratedLifeModel object mdl, evaluated at 100 equally spaced time values. You can specify custom evaluation times by setting the EvaluationTimes name-value argument. distfcn calculates the survivor function values at the stressor level in mdl.BaselineStressorLevel. If mdl.BaselineStressorLevel is empty, distfcn uses the last unique stressor level in mdl.StressorLevels.

example

[fx,T] = distfcn(mdl) also returns the function evaluation times T.

[___] = distfcn(mdl,stressorLevel) calculates the survivor function values at the stressor level specified by stressorLevel. Use this syntax with any of the output argument combinations in the previous syntaxes.

[___] = distfcn(___,Name=Value) specifies options in addition to one or more name-value arguments using any of the input or output argument combinations in the previous syntaxes. For example, Type="cdf" specifies to return the cumulative distribution function (cdf) values of mdl.

example

Examples

collapse all

Load the partFailure data set, which contains simulated observations of failure times for an assembly line part at specific humidity and temperature levels.

load partFailure.mat

Fit an accelerated life model to the data in the partFailure table using the fitacclife function. Use the FailureTime table variable as the failure times, and the other table variables as the stressors.

mdl = fitacclife(partFailure,"FailureTime");

Compute the survivor function values of the model at 100 equally spaced times. By default, the function uses the lowest unique stressor level in mdl.StressorLevels. In this example, the lowest unique stressor level corresponds to a humidity value of 50% and a temperature of 5 degrees Celsius.

[fx,T] = distfcn(mdl);

Plot the survivor function.

plot(T,fx,"+-")
xlabel("Time")
ylabel("Survivor Function")
title("Survivor Function for Humidity=50, Temperature=5")

Figure contains an axes object. The axes object with title Survivor Function for Humidity=50, Temperature=5, xlabel Time, ylabel Survivor Function contains an object of type line.

The plot shows that, at this stressor level, the assembly line part has a survival probability close to 100% for time values smaller than 4. The survival probability drops to approximately zero for time values greater than 7.5.

Load the diodeFailure data set, which contains simulated observations of failure times for a diode at different current levels.

load diodeFailure.mat

Fit an accelerated life model to the data in the diodeFailure table using the fitacclife function. Use the FailureTime table variable as the failure times.

mdl = fitacclife(diodeFailure,"FailureTime");

Compute the probability density function (pdf) values of the model. By default, the software calculates the pdf at 100 evenly spaced times, using the lowest unique stressor level in mdl.StressorLevels. In this data set, the lowest unique stressor level corresponds to a current level of 3 amperes.

[p,T] = distfcn(mdl,Type="pdf");

Plot the pdf.

plot(T,p,"+-")
xlabel("Time")
ylabel("Probability Density Function")
title("Probability Density Function for Current=3")

Figure contains an axes object. The axes object with title Probability Density Function for Current=3, xlabel Time, ylabel Probability Density Function contains an object of type line.

Input Arguments

collapse all

Accelerated life model, specified as an AcceleratedLifeModel object created using fitacclife.

Stressor level, specified as a numeric vector of the same length as mdl.StressorNames.

Data Types: single | double

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: fx=distfcn(mdl,Type="pdf",EvaluationTimes=T) specifies to return the probability density function (pdf) values fx evaluated at the times T.

Evaluation times, specified as a numeric vector. The distfcn function evaluates the Type distribution function at each value in EvaluationTimes. If you do not specify EvaluationTimes, the function performs the evaluations at 100 evenly spaced time values between the 0.001 and 0.999 percentiles of the distribution function.

Example: EvaluationTimes=linspace(1,10,20)'

Data Types: single | double

Distribution function to evaluate, specified as a value in this table.

ValueDescription
"survivor"Survivor Function
"cdf"Cumulative distribution function
"pdf"Probability density function

Example: Type="cdf"

Data Types: char | string

Output Arguments

collapse all

Distribution function values, returned as a numeric vector.

Evaluation times, returned as a numeric vector.

More About

collapse all

Version History

Introduced in R2026a