% % Data file tempdata.m for problem 3 on the EE263 midterm, October 2007. % % Defines N, y, ytom. % y =[... 12.4482, 10.5621, 10.3317, 9.6065, 8.5563, 9.9599, 10.7717, 11.4658, 13.2871, 14.9685, 16.4438, 18.2672, 18.5676, 20.4617, 19.3986, 19.3011, 19.3497, 18.3142, 17.6632, 16.6908, 16.5868, 14.9853, 15.0583, 14.3854, 11.9742, 11.4807, 10.5541, 8.3250, 8.0694, 9.3116, 9.6400, 11.4936, 13.1965, 14.9036, 16.8499, 17.9074, 19.1272, 18.4401, 19.1293, 18.8394, 17.6891, 18.0892, 16.8600, 17.4930, 15.7166, 15.5985, 14.4928, 12.7959, 10.9192, 10.7077, 9.1086, 9.1171, 8.7330, 9.5626, 9.8272, 10.5196, 12.6728, 13.7383, 15.8914, 17.2466, 18.2306, 18.5824, 19.3879, 17.6831, 18.4088, 18.1132, 17.4597, 16.7815, 15.8477, 15.3823, 14.3784, 12.8410, 11.5290, 10.3037, 8.5919, 8.4097, 8.2563, 8.5930, 9.9737, 10.3875, 12.5171, 14.3663, 16.0968, 16.5011, 18.0642, 18.5891, 18.0665, 17.9803, 18.4683, 17.3332, 17.0240, 16.2726, 15.2470, 14.5024, 14.0554, 12.2347, 11.8503, 10.4794, 8.6630, 8.1395, 7.3500, 7.0825, 9.4943, 10.0541, 12.1208, 13.8367, 15.3911, 16.2504, 17.2410, 18.0405, 17.7362, 17.5834, 18.4245, 17.1893, 15.9840, 15.9728, 14.7666, 13.8747, 13.4714, 12.9560, 11.2948, 10.2951, 8.2632, 7.8164, 7.5883, 7.3538, 8.1194, 10.5582, 11.7431, 13.1787, 15.5660, 16.6521, 17.0049, 18.6839, 18.2615, 18.6396, 18.0473, 16.6105, 15.7391, 15.7505, 14.9603, 13.9236, 13.6480, 13.0219, 10.7569, 9.3443, 8.5259, 8.1814, 7.0968, 7.1654, 8.5260, 9.8679, 11.7893, 13.0139, 14.8999, 16.1318, 17.2741, 18.5969, 17.6299, 17.0441, 17.5318, 16.3208, 16.2242, 15.2956, 15.2169, 14.4466, 13.1233, 11.0777]; N=length(y); % Temporary variable to show/disable graph. SHOWGRAPH = 1; if SHOWGRAPH figure() plot(y); end % Tidy up temporary variable. clear SHOWGRAPH; ytom = [... 10.9248, 10.3938, 8.9891, 6.8917, 7.3178, 7.2596, 7.9093, 9.1202, 11.5291, 12.9362, 14.8431, 16.0068, 16.9241, 17.8588, 18.1425, 18.6202, 16.4661, 16.1101, 16.5752, 15.2657, 14.1109, 14.1815, 13.8566, 12.3148]; % To create a plot with y and yhat together, uncomment the following code. % figure() % plot(1:N, y, 'b--') % hold on; % plot(1:N, yhat, 'r')