Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
27
Добавлен:
09.02.2015
Размер:
200.19 Кб
Скачать

Values assigned to a time series object

Example:

Create a time series object:

ts = timeseries(rand(5,1),1:5,[1;0;1;0;1]);

Set QualityInfo:

ts.QualityInfo.Code = [0 1];

ts.QualityInfo.Description = {'good' 'bad'};

Get the data quality strings for this object:

getqualitydesc(ts)

Reference page in Help browser

doc timeseries/getqualitydesc

<timeseries/detrend> - Remove mean or best-fit line and all NaNs from time series data.

DETREND Remove a mean or a best-fit line

TS2 = DETREND(TS1,TYPE) removes a mean or a best-fit line from time series data, usually for FFT processing. TYPE is a string that describes the detrend method, specified as 'constant' or 'linear'.

TS2 = DETREND(TS1,TYPE,INDEX) uses the optional INDEX value to detrend a specific column when TS1.IsTimeFirst is true, or row when

TS1.IsTimeFirst is false. INDEX is specified as an integer array.

NOTE: DETREND cannot be applied to time series data with more than 2 dimensions.

See also timeseries/timeseries

Reference page in Help browser

doc timeseries/detrend

<timeseries/filter> - Shape time series data.

FILTER Shape time series data

TS2=FILTER(TS1,N,D) applies the transfer function filter

N(z^-1)/D(z^-1) to the data in the time series object TS1. N and D are

the coefficient arrays of the transfer function.

Note: The time series must be uniformly sampled to use this filter.

TS2=FILTER(TS1,N,D,INDEX) uses the optional INDEX value to filter a

specific column when TS.IsTimeFirst is true, or row when TS.IsTimeFirst

Is false. Index is specified as an integer array.

See also timeseries/timeseries, timeseries/idealfilter

Reference page in Help browser

doc timeseries/filter

<timeseries/idealfilter> - Apply an ideal (non-causal) filter to time series data.

tstool utility function

Reference page in Help browser

doc timeseries/idealfilter

<timeseries/getabstime> - Extract a date string time vector into a cell array.

GETABSTIME Extract a date string time vector into a cell array

GETABSTIME(TS) extracts the time vector from the time series object TS

as a cell array of date strings (see DATESTR for help on date strings).

The time vector must be defined relative to a calendar date, i.e. the property

TimeInfo.StateDate must be defined. When the TimeInfo.StartDate format

Is a valid datestr format, the output strings from getAbsTime have the same format.

Example:

Create a time series object:

ts=timeseries(rand(5))

Set the StartDate property:

ts.TimeInfo.StartDate='10/27/1974 07:05:36'

Extract the time vector:

getabstime(ts)

See also timeseries/setabstime, timeseries/timeseries

Reference page in Help browser

doc timeseries/getabstime

<timeseries/setabstime> - Set time using date strings.

SETABSTIME Set date strings as the times of a time series.

TS = SETABSTIME(TS, TIMES) sets the times in TS using the date strings

TIMES. TIMES must be either a cell array of strings, or a char array,

containing valid date or time values in the same date format. See

DATESTR for help on date string formats.

TS = SETABSTIME(TS, TIMES, FORMAT) specifies FORMAT used in TIMES explicitly.

Example:

Create a time series object:

ts = timeseries(rand(3,1))

Set the absolute time vector:

ts = setabstime(ts,{'12-DEC-2047 12:34:56','12-DEC-2047 13:34:56','12-DEC-2047 14:34:56'})

See also timeseries/getabstime, timeseries/timeseries

Reference page in Help browser

doc timeseries/setabstime

<timeseries/getinterpmethod> - Interpolation method name for a time series object.

GETINTERPMETHOD Get the interpolation method name for a time series object

GETINTERPMETHOD(TS) returns the interpolation method that is used by

the time series object TS as a string. Predefined interpolation methods are

'zoh' (zero-order hold) and 'linear'(linear interpolation).

Example:

Create a time series object:

ts=timeseries(rand(5))

Get the interpolation method for this object:

getinterpmethod(ts)

See also timeseries/setinterpmethod, timeseries/timeseries

Reference page in Help browser

doc timeseries/getinterpmethod

<timeseries/setinterpmethod> - Set default interpolation method in a time series.

SETINTERPMETHOD Set default interpolation method in a time series.

TS = SETINTERPMETHOD(TS,METHOD), where METHOD is a string, sets the default interpolation method, METHOD, in TS. METHOD can be either 'linear' or 'zoh' (zero-order hold). For example:

ts = timeseries(rand(100,1),1:100);

ts = setinterpmethod(ts,'zoh')

TS = SETINTERPMETHOD(TS,FHANDLE), where FHANDLE is a function handle, sets the interpolation method in TS to a special interpolation method

defined in the function handle FHANDLE. For examle:

ts = timeseries(rand(100,1),1:100);

myFuncHandle = @(new_Time,Time,Data) interp1(Time,Data,new_Time,'linear','extrap');

ts = setinterpmethod(ts,myFuncHandle);

ts = resample(ts,[-5:0.1:10]);

plot(ts);

Note: for FHANDLE, (1) the number of input arguments must be three; (2)

the order of input arguments must be new_Time, Time, and Data; (3) the

single output argument must be the interpolated data only.

TS = SETINTERPMETHOD(TS,INTERPOBJ), where INTERPOBJ is a

tsdata.interpolation object, directly replaces the interpolation object

stored in time series TS. For example:

ts = timeseries(rand(100,1),1:100);

myFuncHandle = @(new_Time,Time,Data) interp1(Time,Data,new_Time,'linear','extrap');

myInterpObj = tsdata.interpolation(myFuncHandle);

ts = setinterpmethod(ts,myInterpObj);

See also timeseries/getinterpmethod, timeseries/timeseries

Reference page in Help browser

doc timeseries/setinterpmethod

<timeseries/plo> - Plot time series data.

timeseries/plo not found.

Use the Help browser search field to search the documentation, or

type "help help" for help command options, such as help for methods.

Соседние файлы в папке Библиотеки Matlab