x=[95.012923.113960.684348.598289.129976.209745.64681.850482.140744.470361.543279.193792.181373.820717.626640.570693.54791.690441.02789.3655.789135.286881.31660.986113.889120.276519.872260.379227.218819.88141.527474.678644.509693.181546.599441.864984.622152.515220.264767.213783.81181.96468.127737.948183.179650.281370.947142.889230.461718.965419.343168.222330.276454.167415.087369.789837.837386.001285.365559.356349.655289.976982.162964.49181.797466.022834.197128.972634.119453.407972.711330.92983.849656.807237.041470.27454.657144.48869.456762.13179.482195.684352.25988.014217.295697.974727.144725.232987.574273.730613.65191.175789.389819.913829.872366.144328.440946.92246.478198.8335];y=[58.279242.349651.551233.395143.290722.59557.980776.036552.982364.052620.906937.981878.332968.084646.109556.782979.42115.918360.28695.026941.537530.499987.43671.500976.79597.084599.008378.886243.865949.831121.396364.349232.003696.009972.663241.195374.456626.794743.992493.33868.333221.25683.923862.878513.377320.713360.719962.988837.047757.514845.14254.38952.718531.26851.286338.396768.31169.28423.533861.239560.8541.5761.635519.007558.69185.758136.756863.145171.763469.26698.407945.435544.182835.32515.360667.564569.921372.750947.838455.484212.104745.075471.588389.284227.310225.476986.560323.23580.487290.839823.189423.93134.97547.838464.081519.088784.386917.3917.079399.4295];plot(x,y,'.')grid onhold onfor i=1:100text(x(i),y(i),[' ',num2str(i)])enda=[4.7576 20 3.206 12.916617.4571 19.33774.7576 20];plot(a(:,1),a(:,2),'y')text(a(1,1),a(1,2),' Ⅰ')b=[50 3053.7465 48.44946.9222 57.119543.1123 56.318733.3207 39.80550 30];plot(b(:,1),b(:,2),'r')text(b(2,1),b(2,2),' Ⅱ')c=[54.6982 7053.7465 9046.9222 8054.6982 70];plot(c(:,1),c(:,2),'b')text(c(2,1),c(2,2),'Ⅲ ')d=[90 7580 9570 8090 75];plot(d(:,1),d(:,2),'g')text(d(1,1),d(1,2),' Ⅳ')就是说在I-Ⅳ区域内的点把他剔除,不知怎么用matlab语言表示这一区域
x=[95.0129 23.1139 60.6843 48.5982 89.1299 76.2097 45.6468 1.8504 82.1407 44.4703 61.5432 79.1937 92.1813 73.8207 17.6266 40.5706 93.547 91.6904 41.027 89.365 5.7891 35.2868 81.3166 0.9861 13.8891 20.2765 19.8722 60.3792 27.2188 19.8814 1.5274 74.6786 44.5096 93.1815 46.5994 41.8649 84.6221 52.5152 20.2647 67.2137 83.8118 1.964 68.1277 37.9481 83.1796 50.2813 70.9471 42.8892 30.4617 18.9654 19.3431 68.2223 30.2764 54.1674 15.0873 69.7898 37.8373 86.0012 85.3655 59.3563 49.6552 89.9769 82.1629 64.491 81.7974 66.0228 34.1971 28.9726 34.1194 53.4079 72.7113 30.929 83.8496 56.8072 37.0414 70.274 54.6571 44.488 69.4567 62.131 79.4821 95.6843 52.259 88.0142 17.2956 97.9747 27.1447 25.2329 87.5742 73.7306 13.6519 1.1757 89.3898 19.9138 29.8723 66.1443 28.4409 46.9224 6.4781 98.8335]; y=[58.2792 42.3496 51.5512 33.3951 43.2907 22.595 57.9807 76.0365 52.9823 64.0526 20.9069 37.9818 78.3329 68.0846 46.1095 56.7829 79.4211 5.9183 60.2869 5.0269 41.5375 30.4999 87.4367 1.5009 76.795 97.0845 99.0083 78.8862 43.8659 49.8311 21.3963 64.3492 32.0036 96.0099 72.6632 41.1953 74.4566 26.7947 43.9924 93.338 68.3332 21.256 83.9238 62.8785 13.3773 20.7133 60.7199 62.9888 37.0477 57.5148 45.1425 4.3895 2.7185 31.2685 1.2863 38.3967 68.3116 9.2842 3.5338 61.2395 60.854 1.576 1.6355 19.0075 58.6918 5.7581 36.7568 63.1451 71.7634 69.2669 8.4079 45.4355 44.1828 35.325 15.3606 67.5645 69.9213 72.7509 47.8384 55.4842 12.1047 45.0754 71.5883 89.2842 27.3102 25.4769 86.5603 23.235 80.4872 90.8398 23.1894 23.9313 4.9754 7.8384 64.0815 19.0887 84.3869 17.39 17.0793 99.4295]; plot(x,y,'.') grid on hold on for i=1:100 text(x(i),y(i),[' ',num2str(i)]) end a=[4.7576 20 3.206 12.9166 17.4571 19.3377 4.7576 20]; plot(a(:,1),a(:,2),'y') text(a(1,1),a(1,2),' Ⅰ') b=[50 30 53.7465 48.449 46.9222 57.1195 43.1123 56.3187 33.3207 39.805 50 30]; plot(b(:,1),b(:,2),'r') text(b(2,1),b(2,2),' Ⅱ') c=[54.6982 70 53.7465 90 46.9222 80 54.6982 70]; plot(c(:,1),c(:,2),'b') text(c(2,1),c(2,2),'Ⅲ ') d=[90 75 80 95 70 80 90 75]; plot(d(:,1),d(:,2),'g') text(d(1,1),d(1,2),' Ⅳ')你可以看到在图中所求区域里的点都是红色的,你可以人为的删除那些点,剩下的就是你要的点了 |
|