This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

matlab.unittest.measurement.MeasurementResult class

Package: matlab.unittest.measurement

Result of measuring test suite


A MeasurementResult holds results from running a measurement experiment on a test suite. It contains the measurement values, categories, and timestamps, and information about the functional test results.

When you run an experiment, the testing framework returns a MeasurementResult object for each Test object in the suite.


expand all

Name of the test suite element that corresponds to the measurement result, returned as a character vector.

Indicator if the measurement is valid, returned as logical 0 or 1. A measurement is valid (logical 1) if it is collected from a passing test. Otherwise it is invalid (logical 0).

Information about sample measurements, returned as a table containing these columns:

Column NameDescription
NameName of the test suite element.
MeasuredValueValue of the measurement. Experiments can give this column a more specific name, such as MeasuredTime.
TimestampTime of measurement.
HostMachine name.
PlatformPlatform architecture.
VersionMATLAB Version.
RunIdentifierUnique identifier of measurement run.

The Samples table does not include information from warm-up runs.

Information about all test activity, including the warm-up measurements, returned as a table. This table is useful when you want all the data, such as during debugging or when performing a more involved data analysis. The TestActivity table contains these columns in addition to the columns described for Samples:

Column NameDescription
PassedLogical value indicating if the test passed
FailedLogical value indicating if the test failed
IncompleteLogical value indicating if test run is incomplete
ObjectiveCategorical value indicating the type of measurement: sample or warmup
TestResultTestResult object from the functional test


sampleSummaryCreate table of summary statistics from MeasurementResult array
samplefunApply function across samples of MeasurementResult array

Copy Semantics

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

Introduced in R2016a

Was this topic helpful?