www.gusucode.com > ident 案例代码 matlab源码程序 > ident/ComputeAndStoreMeansOfInputaAndOutputSignalsExample.m
%% Compute and Store Means of Input and Output Signals % Compute input-output signal means, store them, and detrend the data. %% % Load SISO data containing vectors |u2| and |y2|. % Copyright 2015 The MathWorks, Inc. load dryer2 %% % Create a data object with sample time of 0.08 seconds. data = iddata(y2,u2,0.08); %% % Compute the mean of the data. T = getTrend(data,0); %% % Remove the mean from the data. data_d = detrend(data,T); %% % Plot the original and detrended data on the same plot. plot(data,data_d)