主元处理.m
上传用户:yetwld
上传日期:2010-01-26
资源大小:82k
文件大小:8k
源码类别:

TAPI编程

开发平台:

Matlab

  1. %归一化后的数据集
  2. g_data=[-0.94578 1.2009 0.86645 -0.18396 0.19433 0.19114;
  3. 0.093094 0.69379 -0.87823 -0.35258 0.020337 -0.87556;
  4. -0.32246 0.1867 -0.87823 -1.0271 -1.1976 2.3245;
  5. 0.093094 2.215 1.5643 -1.0271 -1.3716 0.057803;
  6. -0.32246 1.9615 0.86645 -1.3643 -0.67564 0.057803;
  7. 0.093094 0.69379 0.16858 -0.68983 -1.4586 0.99117;
  8. -0.73801 0.1867 0.16858 -0.35258 -0.67564 1.2578;
  9. -0.94578 1.9615 0.86645 -1.0271 -0.50164 -1.4089;
  10. -0.73801 -0.066843 -0.52929 -0.68983 -0.50164 0.99117;
  11. -0.53023 1.708 -0.52929 -0.52121 -0.50164 -0.20887;
  12. -0.94578 -0.066843 -0.52929 -0.01533 -0.50164 0.45782;
  13. -0.94578 1.9615 -0.18036 -0.52121 -0.50164 -0.47555;
  14. -0.53023 0.1867 -0.18036 -1.0271 -1.3716 0.72449;
  15. -0.94578 1.2009 0.86645 -0.68983 -1.1106 -0.87556;
  16. 0.30087 0.69379 -0.52929 -0.01533 0.45532 0.32448;
  17. -0.11468 0.69379 0.16858 -0.68983 -0.93663 -0.60889;
  18. -0.73801 -0.066843 -0.87823 -1.1957 -0.84963 0.99117;
  19. -0.53023 0.1867 -0.18036 -1.0271 -0.93663 -0.47555;
  20. -0.73801 1.2009 0.16858 -1.0271 -0.93663 0.19114;
  21. -0.53023 -1.081 -0.52929 -0.85846 -1.0236 0.85783;
  22. -0.32246 1.708 -0.52929 -0.68983 -0.32765 2.8573;
  23. 0.30087 -0.32039 -0.87823 -0.52121 -0.84963 -0.34221;
  24. 0.50864 -0.32039 -0.87823 -0.52121 -0.32765 -0.075535;
  25. -0.94578 0.1867 0.86645 -0.35258 -0.67564 0.71857;
  26. 0.30087 0.69379 0.86645 -0.68983 -1.1106 0.59115;
  27. -0.11468 -1.5881 -0.18036 -0.01533 0.19433 2.5912;
  28. -0.94578 0.44024 -0.52929 -0.01533 -0.50164 0.72449;
  29. 0.71642 0.59237 -0.52929 -1.3643 -1.0236 0.32448;
  30. 2.1708 0.69379 0.51751 -1.3643 -1.2846 -0.20887;
  31. -0.73801 1.2009 0.72687 -1.0271 -1.1976 1.1245;
  32. 0.093094 -0.57393 -0.87823 -0.52121 -0.06666 2.3245;
  33. -0.32246 0.94733 -0.87823 -0.68983 0.62931 -0.60889;
  34. -0.32246 -0.32039 -0.52929 -0.35258 -0.41465 -0.47555;
  35. 2.5864 -0.32039 -1.2272 -1.0271 -0.67564 -0.34221;
  36. 0.093094 0.94733 0.86645 -0.35258 -0.41465 -0.74222;
  37. -0.53023 -0.066843 -1.2272 -0.68983 -0.50164 -0.60889;
  38. -0.32246 0.69379 -0.52929 -0.18396 0.19433 -0.47555;
  39. -0.11468 0.69379 0.16858 -0.52121 -1.2846 -1.4089;
  40. -0.53023 -0.82747 0.16858 -0.85846 0.45532 -0.47555;
  41. -0.73801 -0.066843 0.16858 -0.01533 0.020337 -0.47555;
  42. -0.53023 0.94733 0.16858 -1.0271 -0.50164 -0.20887;
  43. -0.53023 0.69379 -0.52929 -0.68983 0.36832 -0.74222;
  44. -0.11468 0.94733 0.16858 -0.35258 -0.50164 -0.47555;
  45. -0.73801 0.94733 0.16858 -0.35258 -0.84963 -0.87556;
  46. -0.53023 0.94733 -1.925 -1.1957 -1.3716 -3.009;
  47. -0.73801 0.69379 -0.87823 -0.68983 -0.41465 -2.7423;
  48. -0.32246 -1.8416 -0.87823 -0.85846 -0.50164 2.1912;
  49. 2.7942 -0.57393 -1.5761 -0.35258 -1.0236 -1.1422;
  50. 0.92419 -0.32039 -1.925 -1.3643 -0.84963 -1.4089;
  51. 0.093094 -0.57393 -0.87823 -1.533 -1.1976 -1.2756;
  52. -0.53023 0.44024 -0.87823 -0.68983 -0.67564 -1.0089;
  53. 0.30087 0.1867 0.51751 -0.85846 -0.76263 0.45782;
  54. -0.73801 0.94733 0.86645 -0.52121 -1.0236 0.45782;
  55. 0.30087 0.69379 0.51751 -1.1957 -1.0236 0.99117;
  56. -0.73801 -0.066843 0.16858 -0.52121 -0.58864 1.1245;
  57. -0.53023 1.2009 0.16858 -1.0271 -0.84963 0.32448;
  58. -0.94578 0.1867 0.86645 -1.0271 -1.1976 0.45782;
  59. -0.11468 0.1867 0.16858 -0.01533 -0.50164 0.99117;
  60. -0.32246 1.2009 -0.18036 -1.1957 -1.5456 -0.47555;
  61. -0.11468 0.44024 -0.18036 -1.7016 -1.4586 -0.075535;
  62. -0.32246 -0.32039 -1.2272 -0.52121 -1.1976 -0.34221;
  63. -0.53023 0.69379 0.86645 -0.85846 -0.84963 0.99117;
  64. -0.94578 1.4544 0.86645 -1.533 -1.1976 -0.20887;
  65. 0.30087 0.1867 0.16858 -1.0271 -1.3716 0.59115;
  66. -0.73801 0.1867 -0.52929 -0.68983 -0.84963 0.45782;
  67. -0.53023 1.2009 0.86645 -0.01533 -0.84963 -1.2756;
  68. -0.11468 0.94733 1.9133 -0.52121 -1.5456 0.72449;
  69. -0.73801 1.708 0.86645 -0.68983 -1.0236 -0.74222;
  70. -0.53023 0.1867 -1.2272 -0.68983 -0.41465 0.32448;
  71. -0.53023 0.69379 0.86645 -0.68983 -0.67564 -0.20887;
  72. -0.94578 1.4544 -0.18036 -1.7016 -0.84963 -0.075535;
  73. -0.94578 0.69379 1.5643 -0.68983 0.10733 1.3912;
  74. -0.94578 -1.081 0.86645 -0.52121 -0.41465 0.59115;
  75. -0.94578 0.94733 0.86645 -0.35258 -0.76263 -0.60889;
  76. 3.0019 0.69379 -1.5761 0.32192 0.45532 -0.34221;
  77. 1.9631 0.1867 -0.87823 -0.35258 -0.32765 1.2578;
  78. -0.73801 0.44024 1.9133 2.0082 1.4123 0.057803;
  79. 3.6253 0.1867 -1.5761 1.1651 0.19433 -1.1422;
  80. 4.0408 -1.3346 -1.925 -0.01533 -0.50164 -0.075535;
  81. 0.92419 0.1867 0.16858 -0.01533 0.19433 -0.47555;
  82. -0.94578 -0.066843 -0.52929 0.99643 1.5863 2.1912;
  83. -0.53023 0.1867 -0.87823 -0.68983 -0.32765 -1.1422;
  84. -0.94578 -0.57393 -0.87823 2.0082 2.1083 0.45782;
  85. -0.32246 -0.57393 -0.87823 2.3454 2.1083 0.99117;
  86. -0.94578 -1.3346 0.86645 2.8513 2.4562 -0.34221;
  87. -0.73801 -1.8416 -0.52929 2.3454 2.2822 0.21485;
  88. 0.92419 1.2009 0.86645 0.49055 0.71631 -0.87556;
  89. 1.5475 -0.82747 -0.18036 0.99643 -0.15366 0.057803;
  90. -0.53023 -1.5881 -1.5761 2.0082 1.9343 -0.075535;
  91. -0.11468 -1.3346 -0.52929 2.5141 1.2383 0.85783;
  92. -0.73801 -0.066843 0.86645 0.99643 1.3253 -0.60889;
  93. 1.5475 -0.066843 0.16858 0.65918 0.71631 -0.74222;
  94. -0.94578 0.44024 1.5643 0.99643 1.2383 2.1912;
  95. 0.30087 0.94733 1.9133 -1.0271 -0.15366 0.99117;
  96. -0.11468 -0.066843 0.86645 -0.01533 0.020337 -0.47555;
  97. 2.1708 1.2009 -0.18036 -0.85846 -0.76263 -0.87556;
  98. 2.7942 -1.5881 1.2154 1.3337 0.8903 0.32448;
  99. 0.92419 0.1867 -0.52929 -0.35258 -0.32765 -1.4089;
  100. 1.3397 -2.6023 0.16858 1.3337 1.2383 -0.075535;
  101. -0.11468 -1.3346 -1.5761 2.5141 1.5863 -0.34221;
  102. -0.32246 -0.57393 -2.6229 -0.68983 -0.50164 -0.87556;
  103. 0.71642 -0.32039 0.16858 0.65918 2.1083 0.45782;
  104. 0.92419 -0.57393 -0.18036 -0.35258 -0.41465 -0.34221;
  105. 0.50864 -1.3346 -0.52929 1.3337 1.5863 -0.60889;
  106. -0.11468 -1.8416 0.51751 1.3337 1.5863 -0.09035;
  107. -0.73801 -1.8416 -0.18036 -0.35258 -0.50164 1.3912;
  108. 0.50864 -0.57393 -0.18036 0.1533 0.020337 0.99117;
  109. 1.5475 -2.6023 -0.87823 -0.01533 0.36832 0.99117;
  110. 1.3397 -0.32039 -0.52929 1.3337 2.2822 -0.20887;
  111. 0.093094 -1.3346 -1.5761 1.6709 2.1083 0.85783;
  112. 0.093094 0.69379 0.86645 0.1533 0.71631 -1.4089;
  113. 0.92419 -0.82747 0.16858 0.32192 0.10733 -0.20887;
  114. -0.11468 -0.57393 0.86645 0.8278 1.0643 -0.20887;
  115. 0.71642 -0.57393 -0.52929 1.6709 1.4123 -0.20887;
  116. 0.093094 0.1867 -1.2272 1.3337 2.0213 -0.74222;
  117. -0.94578 -1.3346 1.2154 -0.01533 -0.84963 -0.74222;
  118. -0.73801 -0.066843 0.86645 0.65918 0.71631 -1.1422;
  119. -0.32246 -1.3346 0.51751 0.32192 0.71631 -0.20887;
  120. 0.50864 -1.8416 -1.2272 0.99643 2.1083 0.59115;
  121. -0.53023 -0.82747 0.16858 0.32192 1.7603 0.19114;
  122. -0.73801 0.69379 1.2154 0.32192 -0.15366 -2.2089;
  123. -0.94578 0.69379 0.86645 1.3337 1.4123 -1.8089;
  124. -0.32246 -0.32039 2.9601 -0.18396 0.36832 -1.2459;
  125. -0.53023 0.69379 2.2622 -0.18396 -0.41465 -0.87556;
  126. -0.73801 -0.82747 0.51751 0.65918 0.36832 0.19114;
  127. 0.92419 -0.57393 0.16858 -0.52121 -0.15366 -0.47555;
  128. 3.4175 -0.32039 -0.52929 -0.52121 -0.32765 -0.47555;
  129. -0.94578 0.44024 1.5643 0.65918 0.45532 -1.1422;
  130. -0.53023 0.44024 0.51751 0.32192 -0.41465 -1.4089;
  131. -0.11468 0.1867 1.2154 0.65918 0.020337 -2.3423;
  132. 0.30087 0.69379 0.16858 -0.35258 0.54232 0.99117;
  133. -0.73801 -0.066843 0.16858 -0.35258 0.19433 0.32448;
  134. 0.30087 1.2009 1.5643 0.8278 0.54232 -0.34221;
  135. -0.73801 0.94733 1.2154 -0.01533 -0.15366 -1.8089;
  136. -0.53023 0.69379 1.2154 0.99643 0.45532 0.99117;
  137. -0.53023 0.94733 0.86645 0.32192 1.0643 -0.74222;
  138. 0.093094 0.1867 1.2154 -0.01533 -0.32765 1.2578;
  139. 0.71642 -0.066843 0.16858 -0.52121 -0.06666 0.45782;
  140. -0.53023 -0.066843 1.2154 -0.01533 -0.58864 0.45782;
  141. -0.32246 -0.32039 0.16858 0.49055 -0.06666 -0.74222;
  142. 0.92419 -0.32039 -0.18036 -0.35258 -0.32765 0.057803;
  143. -0.73801 -0.32039 0.16858 -0.35258 -0.58864 -0.20887;
  144. 0.093094 -0.82747 0.16858 2.0082 1.2383 1.3912;
  145. -0.73801 -1.8416 0.16858 0.8278 0.8903 0.59115;
  146. -0.73801 -2.3487 -2.6229 0.65918 0.54232 0.19114;
  147. -0.32246 -1.8416 -1.2272 1.1651 1.0643 1.2578;
  148. 0.093094 -0.82747 -1.5761 0.99643 1.2383 0.32448;
  149. 1.9631 -2.0952 -0.52929 2.1768 1.4123 0.99117;
  150. 0.92419 -0.066843 -1.5761 1.1651 0.8903 -0.34221;
  151. 0.50864 -0.57393 -1.5761 0.49055 1.2383 1.1245;
  152. 0.92419 -1.081 -1.2272 0.1533 -0.84963 0.19114;
  153. -0.73801 0.1867 1.2154 0.99643 0.71631 0.99117;
  154. -0.11468 -0.82747 1.5643 1.3337 0.36832 0.45782;
  155. -0.32246 -1.5881 0.51751 2.3454 1.7603 0.19114
  156. ];
  157. %主成分分析
  158. [pc,latent,explained]=pcacov(g_data);
  159. %各个分量的百分比:27.834、20.808、18.356、14.917、11.695、6.3899。
  160. %故,所选变量合理