function [data,trn_data_n,input_name] = drydata

% collect hair dryer data
% data format:
% [y(k) y(k-1) y(k-2) y(k-3) y(k-4)
%  u(k-1) u(k-2) u(k-3) u(k-4) u(k-5) u(k-6)]

% Copyright 1994-2017 The MathWorks, Inc. 
load drydemodata u2 y2
data_n = length(y2);
output = y2;
input = [[0; y2(1:data_n-1)] ...
	 [0; 0; y2(1:data_n-2)] ...
	 [0; 0; 0; y2(1:data_n-3)] ...
	 [0; 0; 0; 0; y2(1:data_n-4)] ...
	 [0; u2(1:data_n-1)] ...
	 [0; 0; u2(1:data_n-2)] ...
	 [0; 0; 0; u2(1:data_n-3)] ...
	 [0; 0; 0; 0; u2(1:data_n-4)] ...
	 [0; 0; 0; 0; 0; u2(1:data_n-5)] ...
	 [0; 0; 0; 0; 0; 0; u2(1:data_n-6)]];
data = [input output];
data(1:6, :) = [];
input_name = char('y(k-1)', 'y(k-2)', 'y(k-3)', 'y(k-4)', ...
	'u(k-1)', 'u(k-2)', 'u(k-3)', 'u(k-4)', 'u(k-5)', 'u(k-6)');

trn_data_n = 300;	% No. of training data pairs
index = 1:100;
subplot(2,1,1); plot(index, y2(index), '-', index, y2(index), 'o');
ylabel('y(k)');
subplot(2,1,2); plot(index, u2(index), '-', index, u2(index), 'o');
ylabel('u(k)');

end