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.


Add offsets or trends to data signals


data = retrend(data_d,T)


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.


collapse all

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 a data object with sample time of 0.08 seconds.

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);

Introduced in R2009a

Was this topic helpful?