预处理后的数据.m
上传用户:yetwld
上传日期:2010-01-26
资源大小:82k
文件大小:5k
源码类别:

TAPI编程

开发平台:

Matlab

  1. %剔除异常数据
  2. %原始数据集data0[],159×6.
  3. data0=[0.05 61 65 1.15 2.5 7.7625;
  4. 0.3 60 62.5 1.1 2.4 6.8625;
  5. 0.2 59 62.5 0.9 1.7 9.5625;
  6. 0.3 63 66 0.9 1.6 7.65;
  7. 0.2 62.5 65 0.8  2 7.65;
  8. 0.3 60 64 1 1.55 8.4375;
  9. 0.1 59 64 1.1 2 8.6625;
  10. 0.05 62.5 65 0.9  2.1 6.4125;
  11. 0.1 58.5 63 1 2.1 8.4375;
  12. 0.15 62 63 1.05 2.1 7.4250;
  13. 0.05 58.5 63 1.2  2.1 7.9875;
  14. 0.05 62.5 63.5 1.05 2.1 7.200;
  15. 0.15 59 63.5 0.9 1.6 8.2125;
  16. 0.05 61 65 1 1.75 6.8625;
  17. 0.35 60 63 1.2 2.65 7.875;
  18. 0.25 60 64 1 1.85 7.0875;
  19. 0.1  58.5 62.5 0.85 1.9 8.4375;
  20. 0.15 59 63.5 0.9 1.85 7.2000;
  21. 0.1 61 64 0.9 1.85 7.7625;
  22. 0.15 56.5 63 0.95 1.8 8.325;
  23. 0.2 62 63 1 2.2 10.0125;
  24. %12月份
  25. 0.35 58 62.5 1.05 1.9 7.3125;
  26. 0.4 58 62.5 1.05 2.2 7.5375;
  27. 0.05 59 65 1.1  2 8.2075;
  28. 0.35 60 65 1 1.75 8.1;
  29. 0.25 55.5 63.5 1.2  2.5 9.7875;
  30. 0.05 59.5 63 1.2  2.1 8.2125;
  31. 0.45 59.8 63 0.8  1.8 7.875;
  32. 0.8  60 64.5 0.8 1.65 7.425;
  33. 0.1 61 64.8 0.9 1.7 8.55;
  34. 0.3 57.5 62.5 1.05 2.35 9.5625;
  35. 0.2 60.5 62.5 1 2.75 7.0875;
  36. 0.2 58 63 1.1 2.15 7.2;
  37. 0.9 58 62 0.9 2 7.3125;
  38. 0.3 60.5 65 1.1 2.15 6.975;
  39. 0.15 58.5 62 1 2.1 7.0875;
  40. 0.2 60 63 1.15 2.5 7.2;
  41. 0.25 60 64 1.05 1.65 6.4125;
  42. 0.15 57 64 0.95 2.65 7.2;
  43. 0.1 58.5 64 1.2 2.4 7.2;
  44. 0.15 60.5 64 0.9 2.1 7.425;
  45. 0.15 60 63 1 2.6 6.975;
  46. 0.25 60.5 64 1.1 2.1 7.2;
  47. 0.1 60.5 64 1.1 1.9 6.8625;
  48. 0.15 60.5 61 0.85 1.6 5.0625;
  49. 0.1 60 62.5 1 2.15 5.2875;
  50. 0.2 55 62.5 0.95 2.1 9.45;
  51. 0.95 57.5 61.5 1.1 1.8 6.6375;
  52. 0.5 58 61 0.8 1.9 6.4125;
  53. 0.3 57.5 62.5 0.75 1.7 6.525;
  54. 0.15 59.5 62.5 1 2 6.75;
  55. %2003年1月份
  56. 0.35 59 64.5 0.95 1.95 7.9875;
  57. 0.1 60.5 65 1.05 1.8 7.9875;
  58. 0.35 60 64.5 0.85 1.8 8.4375;
  59. 0.1 58.5 64 1.05 2.05 8.55;
  60. 0.15 61 64 0.9 1.9 7.875;
  61. 0.05 59 65 0.9 1.7 7.9875;
  62. 0.25 59 64 1.2 2.1 8.4375;
  63. 0.2 61 63.5 0.85 1.5 7.2;
  64. 0.25 59.5 63.5 0.7 1.55 7.5375;
  65. 0.2 58 62 1.05 1.7 7.3125;
  66. 0.15 60 65 0.95 1.9 8.4375;
  67. 0.05 61.5 65 0.75 1.7 7.425;
  68. 0.35 59 64 0.9 1.6 8.1;
  69. 0.1 59 63 1 1.9 7.9875;
  70. 0.15 61 65 1.2 1.9  6.525;
  71. 0.25 60.5 66.5 1.05 1.5 8.2125;
  72. 0.1 62 65 1 1.8 6.975;
  73. 0.15 59 62 1 2.15 7.875;
  74. 0.15 60 65 1 2 7.425;
  75. 0.05 61.5 63.5 0.7 1.9 7.5375;
  76. 0.05 60 66 1 2.45 8.775;
  77. 0.05 56.5 65 1.05 2.15 8.1;
  78. 0.05 60.5 65 1.1 1.95 7.0875;
  79. 1 60 61.5 1.3 2.65 7.3125;
  80. 1.95 57 61 1.1 2.35 8.1;
  81. 0.75 59 62.5 1.1 2.2 8.6625;
  82. 0.1 59.5 66.5 1.8 3.2 7.65;
  83. 1.15 59 61.5 1.55 2.5 6.6375;
  84. 1.25 56 61 1.2 2.1 7.5375;
  85. 0.5 59 64 1.2 2.5 7.2;
  86. 1.45 60 62.5 1.6 3.4 4.3875;
  87. 0.05 58.5 63 1.5 3.3 9.45;
  88. 0.15 59 62.5 1 2.2 6.6375;
  89. 0.05 57.5 62.5 1.8 3.6 7.9875;
  90. 0.2 57.5 62.5 1.9 3.6 8.4375;
  91. 1.4 56 63.5 1.3 2.1 5.9625;
  92. 0.05 56 65 2.05 3.8 7.3125;
  93. 0.1 55 63 1.9 3.7 7.7825;
  94. 0.5 61 65 1.35 2.8 6.8625;
  95. 0.65 57 63.5 1.5 2.3 7.65;
  96. 0.15 55.5 61.5 1.8 3.5 7.5375;
  97. 0.25 56 63 1.95 3.1 8.325;
  98. 0.1 58.5 65 1.5 3.15 7.0875;
  99. 0.65 58.5 64 1.4 2.8 6.975;
  100. 0.05 59.5 66 1.5 3.1 9.45;
  101. 0.35 60.5 66.5 0.9  2.3 8.4375;
  102. %12  月份 
  103. 0.25 58.5 65 1.2 2.4 7.2;
  104. 0.8 61 63.5 0.95 1.95 6.8625;
  105. 0.95 55.5 65.5 1.6 2.9 7.875;
  106. 0.5 59 63 1.1 2.2 6.4125;
  107. 0.6 53.5 64 1.6 3.1 7.5375;
  108. 0.25 56 61.5 1.95 3.3 7.3125;
  109. 0.2 57.5 60 1 2.1 6.8625;
  110. 0.45 58 64 1.4 3.6 7.9875;
  111. 0.5 57.5 63.5 1.1 2.15 7.3125;
  112. 0.4 56 63 1.6 3.3 7.0875;
  113. 0.25 55 64.5 1.6 3.3 7.525;
  114. 0.1 55 63.5 1.1 2.1 8.775;
  115. 0.4 57.5 63.5 1.25 2.4 8.4375;
  116. 0.65 53.5 62.5 1.2 2.6 8.4375;
  117. 0.6 58 63 1.6 3.7 7.425;
  118. 0.3 56 61.5 1.7 3.6 8.325;
  119. 0.3 60 65 1.25 2.8 6.4125;
  120. 0.5 57 64 1.3 2.45 7.425;
  121. 0.25 57.5 65 1.45 3 7.425;
  122. 0.45 57.5 63 1.7 3.2 7.425;
  123. 0.3 59 62 1.6 3.55 6.975;
  124. 0.05 56 65.5 1.2 1.9 6.975;
  125. 0.1 58.5 65 1.4 2.8 6.6375;
  126. 0.2 56 64.5 1.3 2.8 7.425;
  127. 0.4 55 62 1.5 3.6 8.1;
  128. 0.15 57 64 1.3 3.4 7.7625;
  129. 0.1 60 65.5 1.3 2.3 5.7375;
  130. 0.05 60 65 1.6 3.2 6.075;
  131. 0.2 58 68 1.15 2.6 6.55;
  132. 0.15 60 67 1.15 2.15 6.8625;
  133. 0.1 57 64.5 1.4 2.6 7.7625;
  134. 0.5 57.5 64 1.05 2.3 7.2;
  135. 1.1 58 63 1.05 2.2 7.2;
  136. 0.05 59.5 66 1.4 2.65 6.6375;
  137. %2003 -1
  138. 0.15 59.5 64.5 1.3 2.15 6.4125;
  139. 0.25 59 65.5 1.4 2.4 5.625;
  140. 0.35 60 64 1.1 2.7 8.4375;
  141. 0.1 58.5 64 1.1 2.5 7.875;
  142. 0.35 61 66 1.45 2.7 7.3125;
  143. 0.1 60.5 65.5 1.2 2.3 6.075;
  144. 0.15 60 65.5 1.5 2.65 8.4375;
  145. 0.15 60.5 65 1.3 3 6.975;
  146. 0.3 59 65.5 1.2 2.2 8.6625;
  147. 0.45 58.5 64 1.05 2.35 7.9875;
  148. 0.15 58.5 65.5 1.2 2.05 7.9875;
  149. 0.2 58 64 1.35 2.35 6.975;
  150. 0.5 58 63.5 1.1 2.2 7.65;
  151. 0.1 58 64 1.1 2.05 7.425;
  152. 1.5 57.5 62.5 1.45 3.25 7.0875;
  153. 0.3 57 64 1.8 3.1 8.775;
  154. 0.1 55 64 1.45 2.9 8.1;
  155. 0.1 54 60 1.4 2.7 7.7625;
  156. 0.4 55 59 1.4 2.9 6.75;
  157. %12月份
  158. 0.2 55 62 1.55 3 8.6625;
  159. 0.3 57 61.5 1.5 3.1 7.875;
  160. 0.75 54.5 63 1.85 3.2 8.4375;
  161. 0.5 58.5 61.5 1.55 2.9 7.3125;
  162. 0.4 57.5 61.5 1.35 3.1 8.55;
  163. 0.5 56.5 62 1.25 1.9 7.7625;
  164. %2003-1
  165. 0.1 59 65.5 1.5 2.8 8.4375;
  166. 0.25 57 66 1.6 2.6 7.9875;
  167. 0.2 55.5 64.5 1.9 3.4 7.7625
  168. ];
  169. %  
  170. e=ones(159,1);
  171.    datamean=mean(data0);%求平均
  172.    delta=std(data0);%求标准差
  173.    erastdata=abs(data0-e*datamean)>3*e*delta;%剔除异常数据
  174.    data0(any(erastdata'),:)=[];              %新的数据
  175. %