Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

std (timeseries) - Standard deviation of timeseries data

Syntax

ts_std = std(ts)
ts_std = std(ts,'PropertyName1',PropertyValue1,...)

Description

ts_std = std(ts) returns the standard deviation of the time-series data. When ts.Data is a vector, ts_std is the standard deviation of ts.Data values. When ts.Data is a matrix, ts_std is the standard deviation of each column of ts.Data (when IsTimeFirst is true and the first dimension of ts is aligned with time). For the N-dimensional ts.Data array, std always operates along the first nonsingleton dimension of ts.Data.

ts_std = std(ts,'PropertyName1',PropertyValue1,...) specifies the following optional input arguments:

Examples

  1. Load a 24-by-3 data array.

    load count.dat
    
  2. Create a timeseries object with 24 time values.

    count_ts = timeseries(count,1:24,'Name','CountPerSecond')
    
  3. Calculate the standard deviation of each data column for this timeseries object.

    std(count_ts)
    
    ans =
    
       25.3703   41.4057   68.0281
    

The standard deviation is calculated independently for each data column in the timeseries object.

See Also

iqr (timeseries), mean (timeseries), median (timeseries), var (timeseries), timeseries

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS