Skip to Main Content Skip to Search
Product Documentation

retrend - Add offsets or trends to data signals

Syntax

data = retrend(data_d,T)

Description

data = retrend(data_d,T) returns a data object data by adding the trend information T to each signal in data_d. data_d is a time-domain iddata object. T is an TrendInfo object.

Examples

Subtract means from input-output signals, estimate a linear model, and retrend the simulated output:

% Load SISO data containing vectors u2 and y2
load dryer2
% Create data object with sampling time of 0.08 sec
data=iddata(y2,u2,0.08)
% Remove the mean from the data
[data_d,T] = detrend(data,0)
% Estimate a linear ARX model
m = arx(data_d,[2 2 1])
% Simulate the model output
% with zero initial states
y_sim = sim(m,data_d(:,[],:));
% Retrend the simulated model output
y_tot = retrend(y_sim,T);

See Also

detrend | getTrend | TrendInfo

How To

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

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