Skip to Main Content Skip to Search
Product Documentation

min - Class: timeseries

Minimum value of timeseries data

Syntax

ts_min = min(ts)
ts_min = method(ts,Name,Value)

Description

ts_min = min(ts) returns the minimum value in the timeseries data.

ts_min = method(ts,Name,Value)uses additional options specified by one or more Name,Value pair arguments.

Input Arguments

ts

The timeseries object for which you want the minimum data value.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'MissingData'

A string specifying one of two possible values, remove or interpolate, indicating how to treat missing data during the calculation.

Default: remove

'Quality'

A vector of integers, indicating which quality codes represent missing samples (for vector data) or missing observations (for data arrays with two or more dimensions).

Output Arguments

ts_min

The minimum value of ts.Data, as follows:

  • When ts.Data is a vector, ts_min is the minimum value of ts.Data values.

  • When ts.Data is a matrix, and IsTimeFirst is true, and the first dimension of ts is aligned with time, then ts_min is a row vector containing the minimum value of each column of ts.Data.

When ts.Data is an N-dimensional array, min always operates along the first nonsingleton dimension of ts.Data.

Examples

The following example finds the minimum values in multivariate time-series data. MATLAB finds the minimum independently for each data column in the timeseries object.

% Load a 24-by-3 data array:

load count.dat

% Create a timeseries object with 24 time values:

count_ts = timeseries(count,[1:24],'Name','CountPerSecond');

% Find the minimum in each data column for this timeseries object:

min(count_ts)

MATLAB returns:

7     9     7

See Also

iqr | max | mean | median | std | sum | timeseries | var

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS