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

TAPI编程

开发平台:

Matlab

  1. %归一化后的数据集
  2. g_data=[-0.94511 1.1984 0.85989 -0.17655 0.20138 -0.32083 -0.52864 0.19975;
  3. 0.09072 0.68723 -0.88776 -0.34538 0.027306 -0.12263 0.59178 -0.86904;
  4. -0.32361 0.17607 -0.88776 -1.0207 -1.1912 1.6612 -0.080472 2.3373;
  5. 0.09072 2.2207 1.5589 -1.0207 -1.3653 -1.1137 -1.3129 0.066153;
  6. -0.32361 1.9651 0.85989 -1.3584 -0.66899 -0.81591 -0.97681 0.066153;
  7. 0.09072 0.68723 0.16083 -0.68304 -1.4523 -0.61771 -1.537 1.0013;
  8. -0.73794 0.17607 0.16083 -0.34538 -0.66899 -0.32083 -1.425 1.2685;
  9. -0.94511 1.9651 0.85989 -1.0207 -0.49492 -1.6087 -0.64068 -1.4034;
  10. -0.73794 -0.079514 -0.53823 -0.68304 -0.49492 -0.51904 -1.425 1.0013;
  11. -0.53078 1.7096 -0.53823 -0.51421 -0.49492 -1.0141 -0.97681 -0.20104;
  12. -0.94511 -0.079514 -0.53823 -0.0077242 -0.49492 -0.71725 -1.2009 0.46695;
  13. -0.94511 1.9651 -0.1887 -0.51421 -0.49492 -1.5101 -1.3129 -0.46824;
  14. -0.53078 0.17607 -0.1887 -1.0207 -1.3653 0.472 -0.080472 0.73415;
  15. -0.94511 1.1984 0.85989 -0.68304 -1.1042 -1.0141 -0.4166 -0.86904;
  16. 0.29789 0.68723 -0.53823 -0.0077242 0.46249 -0.12263 -0.4166 0.33335;
  17. -0.11645 0.68723 0.16083 -0.68304 -0.9301 0.17513 0.70382 -0.60184;
  18. -0.73794 -0.079514 -0.88776 -1.1895 -0.84306 -0.22217 -1.0889 1.0013;
  19. -0.53078 0.17607 -0.1887 -1.0207 -0.9301 -0.81591 -0.52864 -0.46824;
  20. -0.73794 1.1984 0.16083 -1.0207 -0.9301 -1.2132 -1.537 0.19975;
  21. -0.53078 -1.1018 -0.53823 -0.85187 -1.0171 0.075581 -0.64068 0.86774;
  22. -0.32361 1.7096 -0.53823 -0.68304 -0.32084 0.76887 -1.537 2.8711;
  23. 0.29789 -0.33509 -0.88776 -0.51421 -0.84306 0.57154 0.92791 -0.33464;
  24. 0.50505 -0.33509 -0.88776 -0.51421 -0.32084 0.6702 0.81586 -0.067445;
  25. -0.94511 0.17607 0.85989 -0.34538 -0.66899 0.96355 0.47974 0.72821;
  26. 0.29789 0.68723 0.85989 -0.68304 -1.1042 0.27379 -0.19251 0.60055;
  27. -0.11645 -1.613 -0.1887 -0.0077242 0.20138 1.3644 -0.64068 2.6045;
  28. -0.94511 0.43165 -0.53823 -0.0077242 -0.49492 0.27379 -0.30456 0.73415;
  29. 0.71222 0.585 -0.53823 -1.3584 -1.0171 1.0666 0.92791 0.33335;
  30. 2.1624 0.68723 0.51036 -1.3584 -1.2782 1.2648 1.6002 -0.20104;
  31. -0.73794 1.1984 0.72007 -1.0207 -1.1912 1.1662 0.3677 1.1349;;
  32. 0.09072 -0.59068 -0.88776 -0.51421 -0.059731 1.2648 -0.52864 2.3373;
  33. -0.32361 0.94281 -0.88776 -0.68304 0.63656 -0.023082 0.47974 -0.60184;
  34. -0.32361 -0.33509 -0.53823 -0.34538 -0.40788 0.17513 0.59178 -0.46824;
  35. 2.5767 -0.33509 -1.2373 -1.0207 -0.66899 1.0666 1.4881 -0.33464;
  36. 0.09072 0.94281 0.85989 -0.34538 -0.40788 0.6702 1.3761 -0.73544;
  37. -0.53078 -0.079514 -1.2373 -0.68304 -0.49492 1.2648 1.9363 -0.60184;
  38. -0.32361 0.68723 -0.53823 -0.17655 0.20138 -0.61771 -0.30456 -0.46824;
  39. -0.11645 0.68723 0.16083 -0.51421 -1.2782 -1.1137 -0.080472 -1.4034;
  40. -0.53078 -0.84626 0.16083 -0.85187 0.46249 -1.5101 -1.3129 -0.46824;
  41. -0.73794 -0.079514 0.16083 -0.0077242 0.027306 -1.0141 -0.75272 -0.46824;
  42. -0.53078 0.94281 0.16083 -1.0207 -0.49492 -1.1137 -1.0889 -0.20104;
  43. -0.53078 0.68723 -0.53823 -0.68304 0.37545 -0.81591 -0.30456 -0.73544;
  44. -0.11645 0.94281 0.16083 -0.34538 -0.49492 -1.1137 -0.86477 -0.46824;
  45. -0.73794 0.94281 0.16083 -0.34538 -0.84306 -1.6087 -1.0889 -0.86904;
  46. -0.53078 0.94281 -1.9363 -1.1895 -1.3653 -1.9065 0.3677 -3.0066;
  47. -0.73794 0.68723 -0.88776 -0.68304 -0.40788 -2.5011 -0.52864 -2.7394;
  48. -0.32361 -1.8686 -0.88776 -0.85187 -0.49492 0.76887 -0.97681 2.2037;
  49. 2.7839 -0.59068 -1.5868 -0.34538 -1.0171 -0.61771 0.25565 -1.1362;
  50. 0.91938 -0.33509 -1.9363 -1.3584 -0.84306 -0.51904 0.59178 -1.4034;
  51. 0.09072 -0.59068 -0.88776 -1.5272 -1.1912 -0.32083 0.70382 -1.2698;
  52. -0.53078 0.43165 -0.88776 -0.68304 -0.66899 -0.71725 0.03157 -1.0026;
  53. 0.29789 0.17607 0.51036 -0.85187 -0.75603 0.86841 0.59178 0.46695;
  54. -0.73794 0.94281 0.85989 -0.51421 -1.0171 -0.023082 -0.4166 0.46695;
  55. 0.29789 0.68723 0.51036 -1.1895 -1.0171 0.57154 -0.19251 1.0013;
  56. -0.73794 -0.079514 0.16083 -0.51421 -0.58195 -0.12263 -1.0889 1.1349;
  57. -0.53078 1.1984 0.16083 -1.0207 -0.84306 -0.22217 -0.52864 0.33335;
  58. -0.94511 0.17607 0.85989 -1.0207 -1.1912 -0.91546 -1.425 0.46695;
  59. -0.11645 0.17607 0.16083 -0.0077242 -0.49492 -0.32083 -1.2009 1.0013;
  60. -0.32361 1.1984 -0.1887 -1.1895 -1.5394 -1.4105 -1.2009 -0.46824;
  61. -0.11645 0.43165 -0.1887 -1.696 -1.4523 -1.2132 -1.3129 -0.067445;
  62. -0.32361 -0.33509 -1.2373 -0.51421 -1.1912 -1.2132 -1.0889 -0.33464;
  63. -0.53078 0.68723 0.85989 -0.85187 -0.84306 -0.32083 -1.2009 1.0013;
  64. -0.94511 1.454 0.85989 -1.5272 -1.1912 -1.3119 -1.3129 -0.20104;
  65. 0.29789 0.17607 0.16083 -1.0207 -1.3653 -0.51904 -1.0889 0.60055;
  66. -0.73794 0.17607 -0.53823 -0.68304 -0.84306 -0.32083 -0.75272 0.46695;
  67. -0.53078 1.1984 0.85989 -0.0077242 -0.84306 -1.807 -0.97681 -1.2698;
  68. -0.11645 0.94281 1.9085 -0.51421 -1.5394 -0.51904 -1.2009 0.73415;
  69. -0.73794 1.7096 0.85989 -0.68304 -1.0171 -1.4105 -0.97681 -0.73544;
  70. -0.53078 0.17607 -1.2373 -0.68304 -0.40788 -0.61771 -0.97681 0.33335;
  71. -0.53078 0.68723 0.85989 -0.68304 -0.66899 -1.1137 -1.0889 -0.20104;
  72. -0.94511 1.454 -0.1887 -1.696 -0.84306 -0.91546 -0.97681 -0.067445;
  73. -0.94511 0.68723 1.5589 -0.68304 0.11434 0.17513 -0.97681 1.4021;
  74. -0.94511 -1.1018 0.85989 -0.51421 -0.40788 -0.81591 -1.425 0.60055;
  75. -0.94511 0.94281 0.85989 -0.34538 -0.75603 -1.6087 -1.3129 -0.60184;
  76. 2.991 0.68723 -1.5868 0.32994 0.46249 0.17513 0.47974 -0.33464;
  77. 1.9552 0.17607 -0.88776 -0.34538 -0.32084 1.0666 0.14361 1.2685;
  78. -0.73794 0.43165 1.9085 2.0182 1.4199 -0.61771 -0.75272 0.066153;
  79. 3.6125 0.17607 -1.5868 1.1741 0.20138 0.27379 1.264 -1.1362;
  80. 4.0269 -1.3574 -1.9363 -0.0077242 -0.49492 1.463 1.7122 -0.067445;
  81. 0.91938 0.17607 0.16083 -0.0077242 0.20138 0.472 0.92791 -0.46824;
  82. -0.94511 -0.079514 -0.53823 1.0053 1.594 1.0666 -0.64068 2.2037;
  83. -0.53078 0.17607 -0.88776 -0.68304 -0.32084 0.27379 1.264 -1.1362;
  84. -0.94511 -0.59068 -0.88776 2.0182 2.1162 0.472 0.14361 0.46695;
  85. -0.32361 -0.59068 -0.88776 2.3559 2.1162 0.96796 0.25565 1.0013;
  86. -0.94511 -1.3574 0.85989 2.8624 2.4643 0.6702 1.0399 -0.33464;
  87. -0.73794 -1.8686 -0.53823 2.3559 2.2903 1.2824 1.264 0.2235;
  88. 0.91938 1.1984 0.85989 0.49877 0.7236 -0.61771 0.03157 -0.86904;
  89. 1.5409 -0.84626 -0.1887 1.0053 -0.14677 0.17513 0.14361 0.066153;
  90. -0.53078 -1.613 -1.5868 2.0182 1.9421 0.86841 1.0399 -0.067445;
  91. -0.11645 -1.3574 -0.53823 2.5247 1.2458 1.2648 0.70382 0.86774;
  92. -0.73794 -0.079514 0.85989 1.0053 1.3329 0.075581 0.59178 -0.60184;
  93. 1.5409 -0.079514 0.16083 0.66759 0.7236 0.472 1.152 -0.73544;
  94. -0.94511 0.43165 1.5589 1.0053 1.2458 0.57154 -1.2009 2.2037;
  95. 0.29789 0.94281 1.9085 -1.0207 -0.14677 0.27379 -0.52864 1.0013;
  96. -0.11645 -0.079514 0.85989 -0.0077242 0.027306 -0.4195 -0.080472 -0.46824;
  97. 2.1624 1.1984 -0.1887 -0.85187 -0.75603 0.27379 1.0399 -0.86904;
  98. 2.7839 -1.613 1.2094 1.3429 0.89767 1.3644 1.264 0.33335;
  99. 0.91938 0.17607 -0.53823 -0.34538 -0.32084 0.96796 0.3677 -1.4034;
  100. 1.3337 -2.6353 0.16083 1.3429 1.2458 1.463 1.7122 -0.067445;
  101. -0.11645 -1.3574 -1.5868 2.5247 1.594 0.86841 1.264 -0.33464;
  102. -0.32361 -0.59068 -2.6354 -0.68304 -0.49492 -0.12263 0.59178 -0.86904;
  103. 0.71222 -0.33509 0.16083 0.66759 2.1162 0.37333 0.03157 0.46695;
  104. 0.91938 -0.59068 -0.1887 -0.34538 -0.40788 0.17513 0.47974 -0.33464;
  105. 0.50505 -1.3574 -0.53823 1.3429 1.594 0.86841 1.4881 -0.60184;
  106. -0.11645 -1.8686 0.51036 1.3429 1.594 -0.51904 -0.51619 -0.08229;
  107. -0.73794 -1.8686 -0.1887 -0.34538 -0.49492 0.6702 -0.4166 1.4021;
  108. 0.50505 -0.59068 -0.1887 0.16111 0.027306 1.0666 0.3677 1.0013;
  109. 1.5409 -2.6353 -0.88776 -0.0077242 0.37545 1.1662 0.47974 1.0013;
  110. 1.3337 -0.33509 -0.53823 1.3429 2.2903 1.2648 1.6002 -0.20104;
  111. 0.09072 -1.3574 -1.5868 1.6806 2.1162 0.96796 0.3677 0.86774;
  112. 0.09072 0.68723 0.85989 0.16111 0.7236 -0.91546 0.14361 -1.4034;
  113. 0.91938 -0.84626 0.16083 0.32994 0.11434 0.57154 0.81586 -0.20104;
  114. -0.11645 -0.59068 0.85989 0.83642 1.0717 -0.023082 0.14361 -0.20104;
  115. 0.71222 -0.59068 -0.53823 1.6806 1.4199 0.96796 1.264 -0.20104;
  116. 0.09072 0.17607 -1.2373 1.3429 2.0292 -0.023082 0.59178 -0.73544;
  117. -0.94511 -1.3574 1.2094 -0.0077242 -0.84306 -0.91546 -0.4166 -0.73544;
  118. -0.73794 -0.079514 0.85989 0.66759 0.7236 -1.0141 -0.19251 -1.1362;
  119. -0.32361 -1.3574 0.51036 0.32994 0.7236 0.075581 0.25565 -0.20104;
  120. 0.50505 -1.8686 -1.2373 1.0053 2.1162 1.2648 0.92791 0.60055;
  121. -0.53078 -0.84626 0.16083 0.32994 1.768 0.27379 0.14361 0.19975;
  122. -0.73794 0.68723 1.2094 0.32994 -0.14677 -1.9065 -0.30456 -2.205;
  123. -0.94511 0.68723 0.85989 1.3429 1.4199 -1.7083 -0.4166 -1.8042;
  124. -0.32361 -0.33509 2.9571 -0.17655 0.37545 -1.9065 -1.1137 -1.2401;
  125. -0.53078 0.68723 2.258 -0.17655 -0.40788 -1.2132 -0.64068 -0.86904;
  126. -0.73794 -0.84626 0.51036 0.66759 0.37545 -0.4195 -0.64068 0.19975;
  127. 0.91938 -0.59068 0.16083 -0.51421 -0.14677 -0.32083 0.03157 -0.46824;
  128. 3.4054 -0.33509 -0.53823 -0.51421 -0.32084 0.57154 1.0399 -0.46824;
  129. -0.94511 0.43165 1.5589 0.66759 0.46249 -0.71725 0.14361 -1.1362;
  130. -0.53078 0.43165 0.51036 0.32994 -0.40788 0.472 1.7122 -1.4034;
  131. -0.11645 0.17607 1.2094 0.66759 0.027306 0.17513 2.1604 -2.3386;
  132. 0.29789 0.68723 0.16083 -0.34538 0.54953 -0.023082 -0.86477 1.0013;
  133. -0.73794 -0.079514 0.16083 -0.34538 0.20138 -0.51904 -0.86477 0.33335;
  134. 0.29789 1.1984 1.5589 0.83642 0.54953 -0.023082 0.25565 -0.33464;
  135. -0.73794 0.94281 1.2094 -0.0077242 -0.14677 -1.4105 -0.080472 -1.8042;
  136. -0.53078 0.68723 1.2094 1.0053 0.46249 0.27379 -0.52864 1.0013;
  137. -0.53078 0.94281 0.85989 0.32994 1.0717 -1.1137 -0.64068 -0.73544;
  138. 0.09072 0.17607 1.2094 -0.0077242 -0.32084 0.76887 -0.19251 1.2685;
  139. 0.71222 -0.079514 0.16083 -0.51421 -0.059731 -0.32083 -0.75272 0.46695;
  140. -0.53078 -0.079514 1.2094 -0.0077242 -0.58195 0.27379 -0.080472 0.46695;
  141. -0.32361 -0.33509 0.16083 0.49877 -0.059731 -0.4195 0.14361 -0.73544;
  142. 0.91938 -0.33509 -0.1887 -0.34538 -0.32084 -0.12263 -0.19251 0.066153;
  143. -0.73794 -0.33509 0.16083 -0.34538 -0.58195 0.075581 0.25565 -0.20104;
  144. 0.09072 -0.84626 0.16083 2.0182 1.2458 1.1662 0.14361 1.4021;
  145. -0.73794 -1.8686 0.16083 0.83642 0.89767 1.0666 0.70382 0.60055;
  146. -0.73794 -2.3797 -2.6354 0.66759 0.54953 0.76887 2.3845 0.19975;
  147. 0.09072 -0.84626 -1.5868 1.0053 1.2458 2.0577 2.0483 0.33335;
  148. 1.9552 -2.1242 -0.53823 2.1871 1.4199 2.8505 2.3845 1.0013;
  149. 0.91938 -0.079514 -1.5868 1.1741 0.89767 2.1563 2.7206 -0.33464;
  150. 0.50505 -0.59068 -1.5868 0.49877 1.2458 2.7509 2.1604 1.1349;
  151. 0.91938 -1.1018 -1.2373 0.16111 -0.84306 2.1563 2.2724 0.19975;
  152. -0.73794 0.17607 1.2094 1.0053 0.7236 0.37333 -0.4166 1.0013;
  153. -0.11645 -0.84626 1.5589 1.3429 0.37545 -0.51904 -0.97681 0.46695;
  154. -0.32361 -1.613 0.51036 2.3559 1.768 0.075581 -0.080472 0.19975];
  155. %主成分分析
  156. [pc,latent,explained]=pcacov(g_data);
  157. %各个分量的百分比:26.607、18.059、16.564、12.386、10.05、9.4954、5.1511、1.6877。
  158. %故,所选变量合理