Main Content

matlab.perftest.FrequentistTimeExperiment Class

Namespace: matlab.perftest
Superclasses: matlab.perftest.TimeExperiment

TimeExperiment that collects variable number of measurements

Description

A FrequentistTimeExperiment is a subclass of the TimeExperiment class that collects a variable number of measurements. The testing framework collects a variable number of measurements to reach a specified relative margin of error within a specified confidence level.

To create a FrequentistTimeExperiment instance, use the matlab.perftest.TimeExperiment.limitingSamplingError static method.

Properties

expand all

Number of warm-up measurements, specified as a nonnegative integer. NumWarmups defines the number of times that the framework runs the test code to warm it up.

Minimum number of sample measurements, specified as an integer greater than 1. MinSamples defines the minimum number of times that the framework runs the test code after NumWarmups. The framework exercises the test code at least MinSamples times, regardless of whether the experiment meets the statistical objectives.

Maximum number of sample measurements, specified as an integer greater than or equal to MinSamples. MaxSamples defines the maximum number of times that the framework runs the test code after NumWarmups. The framework will stop after it takes MaxSamples samples, even if the experiment does not meet the statistical objectives.

Goal relative margin of error for samples, specified as a positive number.

The framework calculates the Relative Margin of Error for a sample X using the equation

relMoE=Tstd(X)mean(X)length(X)

where T is the T-score from Student's T distribution using the specified ConfidenceLevel and length(X)-1 degrees of freedom.

Confidence level for the samples to be within the relative margin of error, specified as a number between 0 and 1.

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Version History

Introduced in R2016a

expand all