我需要将数百个文本文件作为单个矩阵导入,但每个文本文件都有6行垃圾标题,我想忽略/删除。文本文件以制表符分隔。我只需要从第7行开始将每个文件作为唯一矩阵导入。每个文件中有149列,长度范围为400-1500行。这该怎么做?另外,我如何将每个文件的第5列绘制到同一个图上?
这就是我目前正在尝试的工作:
txtfiles = dir('*.txt');
numfiles = length(txtfiles);
for k = 1:numfiles
%textscan(txtfiles(k).name)
curname = txtfiles(k).name;
FID=fopen(curname);
datacell = textscan(FID, 'f%f%f%f', ...
'HeaderLines', 6, 'CollectOutput', 1);
fclose(FID);
A = datacell{1};
end
这就是文本文件的样子:
PathFileType 4 (X/Y/Z) C:\Users\P\Desktop\Data\STS1.trc
DataRate CameraRate NumFrames NumMarkers Units OrigDataRate OrigDataStartFrame OrigNumFrames
120.00 120.00 878 29 mm 120.00 1 878
Frame# Time Top.Head Front.Head Rear.Head R.Shoulder R.Offset R.Elbow R.Wrist L.Shoulder L.Elbow L.Wrist R.ASIS L.ASIS V.Sacral R.Thigh R.Knee R.Shank R.Ankle R.Heel R.Toe L.Thigh L.Knee L.Shank L.Ankle L.Heel L.Toe R.Knee.Medial R.Ankle.Medial L.Knee.Medial L.Ankle.Medial V_Mid_ASIS V_Pelvis_Origin V_R.Hip_JC V_L.Hip_JC V_R.Knee_JC_Static V_L.Knee_JC_Static V_R.Ankle_JC_Static V_L.Ankle_JC_Static V_R.Knee_JC V_L.Knee_JC V_R.Ankle_JC V_L.Ankle_JC V_Mid_Hip V_Mid_Shoulder V_R.Hand V_L.Hand V_R.Toe_Offset_Static V_L.Toe_Offset_Static V_R.Toe_Offset V_L.Toe_Offset
X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3 X4 Y4 Z4 X5 Y5 Z5 X6 Y6 Z6 X7 Y7 Z7 X8 Y8 Z8 X9 Y9 Z9 X10 Y10 Z10 X11 Y11 Z11 X12 Y12 Z12 X13 Y13 Z13 X14 Y14 Z14 X15 Y15 Z15 X16 Y16 Z16 X17 Y17 Z17 X18 Y18 Z18 X19 Y19 Z19 X20 Y20 Z20 X21 Y21 Z21 X22 Y22 Z22 X23 Y23 Z23 X24 Y24 Z24 X25 Y25 Z25 X26 Y26 Z26 X27 Y27 Z27 X28 Y28 Z28 X29 Y29 Z29 X30 Y30 Z30 X31 Y31 Z31 X32 Y32 Z32 X33 Y33 Z33 X34 Y34 Z34 X35 Y35 Z35 X36 Y36 Z36 X37 Y37 Z37 X38 Y38 Z38 X39 Y39 Z39 X40 Y40 Z40 X41 Y41 Z41 X42 Y42 Z42 X43 Y43 Z43 X44 Y44 Z44 X45 Y45 Z45 X46 Y46 Z46 X47 Y47 Z47 X48 Y48 Z48 X49 Y49 Z49
1 0.000 578.07806 1549.15051 -222.10861 582.42267 1488.45020 -150.36578 563.25293 1428.10291 -358.14984 424.26584 1281.06860 -338.22803 504.68622 1037.25378 -450.03931 322.89386 924.37604 -317.79419 321.13821 719.21008 -192.82649 722.02570 1291.98120 -345.90573 827.16968 932.11102 -315.86163 829.74890 713.94104 -204.21365 460.80588 849.29614 -259.36377 725.33618 849.07758 -321.35016 538.44873 850.64178 -472.68457 413.92474 755.16034 -34.96117 356.78342 656.36346 38.76009 374.58469 460.21146 19.69482 394.72556 281.48828 -82.69444 444.48990 253.92299 -143.76108 398.78040 239.94897 46.18449 730.78320 747.37939 -44.34066 774.68842 630.90723 47.31462 748.68585 441.55353 -4.17119 717.03888 277.31525 -98.16077 662.72064 257.86353 -148.39008 705.67841 240.00070 37.66716 468.87674 621.90070 59.08336 474.91696 291.71790 -58.21749 660.09216 626.54254 66.12887 638.38428 292.67764 -63.12149 593.07104 849.18689 -290.35696 579.43481 849.64166 -348.55203 494.55240 757.33771 -329.38379 663.85175 757.19788 -369.05505 412.83008 639.13208 48.92172 717.39026 628.72485 56.72174 434.82126 286.60309 -70.45597 677.71161 284.99643 -80.64113 414.15628 641.45532 60.94458 714.27588 615.87555 67.47660 438.84448 275.22925 -66.18838 676.67859 283.57892 -73.62092 579.20209 757.26776 -349.21942 573.14575 1286.52490 -342.06686 320.43594 637.14368 -142.83942 830.78058 626.67303 -159.55447 398.78040 239.94897 26.18449 705.67841 240.00070 17.66716 395.66873 220.34248 43.75488 705.05811 220.08913 35.89385
2 0.008 578.07141 1549.15735 -222.12216 582.40057 1488.47058 -150.36993 563.27405 1428.09717 -358.14203 424.27509 1281.09106 -338.19501 504.68646 1037.27405 -450.02933 322.93146 924.38745 -317.75854 321.18677 719.21857 -192.83357 722.03998 1291.99280 -345.90076 827.16187 932.11371 -315.87897 829.68628 713.94934 -204.21298 460.82901 849.32904 -259.36237 725.33636 849.08423 -321.35602 538.43628 850.65222 -472.69458 413.93283 755.15924 -34.96411 356.79126 656.35864 38.75017 374.59924 460.20187 19.68288 394.73041 281.47412 -82.70995 444.49213 253.91530 -143.75822 398.79437 239.95001 46.18539 730.81970 747.38501 -44.35924 774.74005 630.90015 47.28659 748.67841 441.58804 -4.23859 717.04755 277.30865 -98.15942 662.73602 257.88791 -148.39410 705.69049 240.00151 37.66610 468.88843 621.90277 59.08383 474.90295 291.69644 -58.26284 660.19403 626.55139 66.12325 638.39575 292.68515 -63.12182 593.08270 849.20660 -290.35919 579.44489 849.65808 -348.54926 494.56226 757.36951 -329.37161 663.84698 757.21283 -369.04755 412.83984 639.13068 48.91700 717.46704 628.72577 56.70492 434.81668 286.58530 -70.48640 677.72162 284.99692 -80.64062 414.16898 641.45361 60.92418 714.29749 615.90765 67.38762 438.85022 275.22717 -66.20164 676.68585 283.58505 -73.62514 579.20465 757.29114 -349.20959 573.15753 1286.54199 -342.04788 320.48889 637.15100 -142.86359 830.69604 626.68359 -159.54659 398.79437 239.95001 26.18539 705.69049 240.00151 17.66610 395.68719 220.34254 43.75785 705.06299 220.09024 35.89198
3 0.017 578.06696 1549.16443 -222.13680 582.38141 1488.49182 -150.37547 563.29578 1428.09131 -358.13553 424.28442 1281.11218 -338.16238 504.68698 1037.29321 -450.01859 322.96741 924.39795 -317.72415 321.23508 719.22565 -192.83934 722.05438 1292.00427 -345.89575 827.15356 932.11530 -315.89606 829.62433 713.95685 -204.21211 460.85236 849.36053 -259.36084 725.33704 849.09039 -321.36160 538.42535 850.66272 -472.70282 413.94089 755.15808 -34.96635 356.79880 656.35425 38.74130 374.61288 460.19308 19.67173 394.73553 281.46118 -82.72367 444.49405 253.90808 -143.75546 398.80777 239.95140 46.18635 730.85583 747.39014 -44.37709 774.79138 630.89276 47.25950 748.67249 441.62027 -4.30229 717.05573 277.30246 -98.15792 662.74878 257.91034 -148.39815 705.70233 240.00237 37.66516 468.90030 621.90460 59.08529 474.88895 291.67554 -58.30784 660.30164 626.56012 66.12052 638.40662 292.69202 -63.12206 593.09467 849.22546 -290.36121 579.45532 849.67389 -348.54636 494.57263 757.40039 -329.35986 663.84283 757.22742 -369.04037 412.84955 639.12939 48.91330 717.54651 628.72644 56.69001 434.81223 286.56836 -70.51575 677.73120 284.99722 -80.63999 414.18085 641.45203 60.90602 714.32013 615.93805 67.30240 438.85620 275.22488 -66.21367 676.69293 283.59100 -73.62849 579.20770 757.31390 -349.20010 573.16937 1286.55823 -342.02905 320.54214 637.15674 -142.88542 830.61261 626.69348 -159.53853 398.80777 239.95140 26.18635 705.70233 240.00237 17.66516 395.70450 220.34308 43.76075 705.06799 220.09137 35.89036
4 0.025 578.06677 1549.17200 -222.15352 582.36774 1488.51465 -150.38351 563.31909 1428.08545 -358.13141 424.29370 1281.13074 -338.13037 504.68799 1037.31030 -450.00674 323.00058 924.40686 -317.69220 321.28256 719.22998 -192.84291 722.06866 1292.01489 -345.89114 827.14423 932.11481 -315.91281 829.56348 713.96271 -204.21091 460.87613 849.38965 -259.35883 725.33850 849.09552 -321.36685 538.41693 850.67303 -472.70807 413.94897 755.15680 -34.96721 356.80551 656.35059 38.73447 374.62491 460.18558 19.66194 394.74109 281.45056 -82.73444 444.49548 253.90161 -143.75296 398.82004 239.95326 46.18732 730.89136 747.39447 -44.39344 774.84204 630.88477 47.23421 748.66937 441.64847 -4.35954 717.06299 277.29691 -98.15623 662.75745 257.92950 -148.40205 705.71356 240.00327 37.66439 468.91217 621.90619 59.08857 474.87485 291.65567 -58.35194 660.42023 626.56854 66.12308 638.41656 292.69772 -63.12215 593.10730 849.24255 -290.36285 579.46637 849.68848 -348.54309 494.58374 757.42944 -329.34863 663.83966 757.24121 -369.03378 412.85886 639.12836 48.91152 717.63116 628.72668 56.67864 434.80798 286.55313 -70.54319 677.73981 284.99731 -80.63919 414.19101 641.45068 60.89182 714.34491 615.96490 67.22484 438.86258 275.22226 -66.22359 676.69971 283.59653 -73.63049 579.21167 757.33533 -349.19119 573.18115 1286.57275 -342.01074 320.59537 637.15924 -142.90320 830.53119 626.70190 -159.53015 398.82004 239.95326 26.18732 705.71356 240.00327 17.66439 395.71960 220.34428 43.76338 705.07306 220.09251 35.88912
5 0.033 578.07257 1549.17993 -222.17319 582.36163 1488.53967 -150.39473 563.34473 1428.07947 -358.13049 424.30261 1281.14575 -338.09915 504.68936 1037.32483 -449.99374 323.03046 924.41333 -317.66357 321.32822 719.23065 -192.84392 722.08209 1292.02295 -345.88791 827.13342 932.11127 -315.92960 829.50409 713.96625 -204.20932 460.90021 849.41565 -259.35587 725.34064 849.09918 -321.37180 538.41180 850.68292 -472.70987 413.95694 755.15533 -34.96606 356.81076 656.34784 38.73051 374.63489 460.17975 19.65404 394.74686 281.44305 -82.74197 444.49646 253.89604 -143.75098 398.83054 239.95537 46.18819 730.92584 747.39801 -44.40755 774.89136 630.87616 47.21148 748.66968 441.67154 -4.40879 717.06909 277.29193 -98.15450 662.76141 257.94485 -148.40559 705.72375 240.00404 37.66366 468.92358 621.90765 59.09414 474.86066 291.63742 -58.39412 660.55341 626.57678 66.13264 638.42529 292.70221 -63.12214 593.12042 849.25739 -290.36383 579.47778 849.70142 -348.53928 494.59540 757.45612 -329.33768 663.83734 757.25360 -369.02789 412.86719 639.12775 48.91233 717.72241 628.72650 56.67206 434.80374 286.54022 -70.56805 677.74719 284.99707 -80.63832 414.19885 641.44983 60.88240 714.37201 615.98706 67.15769 438.86899 275.21948 -66.23103 676.70599 283.60150 -73.63105 579.21637 757.35486 -349.18277 573.19232 1286.58435 -341.99353 320.64731 637.15759 -142.91606 830.45233 626.70825 -159.52121 398.83054 239.95537 26.18819 705.72375 240.00404 17.66366 395.73163 220.34599 43.76553 705.07782 220.09349 35.88815
6 0.042 578.08588 1549.18835 -222.19646 582.36450 1488.56677 -150.40939 563.37341 1428.07275 -358.13312 424.31094 1281.15662 -338.06894 504.69083 1037.33618 -449.97983 323.05698 924.41681 -317.63879 321.37064 719.22717 -192.84242 722.09406 1292.02686 -345.88690 827.12079 932.10400 -315.94684 829.44611 713.96692 -204.20734 460.92407 849.43811 -259.35126 725.34332 849.10107 -321.37613 538.41022 850.69202 -472.70807 413.96457 755.15375 -34.96246 356.81393 656.34583 38.72992 374.64261 460.17557 19.64865 394.75226 281.43909 -82.74693 444.49701 253.89154 -143.74985 398.83875 239.95750 46.18889 730.95892 747.40063 -44.41883 774.93866 630.86688 47.19197 748.67316 441.68939 -4.44986 717.07367 277.28741 -98.15311 662.76099 257.95660 -148.40849 705.73248 240.00450 37.66269 468.93372 621.90924 59.10220 474.84680 291.62143 -58.43286 660.70197 626.58490 66.15015 638.43298 292.70584 -63.12206 593.13373 849.26959 -290.36371 579.48914 849.71228 -348.53452 494.60715 757.47986 -329.32651 663.83551 757.26422 -369.02240 412.87381 639.12756 48.91606 717.82031 628.72589 56.67106 434.79953 286.53024 -70.58990 677.75336 284.99661 -80.63758 414.20404 641.44940 60.87769 714.40100 616.00409 67.10224 438.87469 275.21698 -66.23629 676.71143 283.60587 -73.63052 579.22131 757.37201 -349.17447 573.20251 1286.59167 -341.97791 320.69611 637.15131 -142.92387 830.37622 626.71210 -159.51154 398.83875 239.95750 26.18889 705.73248 240.00450 17.66269 395.74011 220.34798 43.76709 705.08179 220.09410 35.88714
7 0.050 578.10748 1549.19727 -222.22368 582.37732 1488.59607 -150.42754 563.40497 1428.06494 -358.13873 424.31824 1281.16272 -338.03998 504.69205 1037.34448 -449.96536 323.08054 924.41681 -317.61798 321.40854 719.21924 -192.83867 722.10388 1292.02466 -345.88876 827.10596 932.09265 -315.96509 829.38910 713.96429 -204.20511 460.94684 849.45673 -259.34442 725.34625 849.10114 -321.37909 538.41217 850.70001 -472.70279 413.97162 755.15228 -34.95613 356.81467 656.34442 38.73293 374.64801 460.17297 19.64643 394.75650 281.43851 -82.75058 444.49722 253.88837 -143.74980 398.84448 239.95943 46.18940 730.99017 747.40265 -44.42699 774.98322 630.85742 47.17620 748.67883 441.70300 -4.48388 717.07666 277.28326 -98.15250 662.75714 257.96545 -148.41026 705.73944 240.00450 37.66124 468.94171 621.91095 59.11267 474.83340 291.60818 -58.46715 660.86237 626.59351 66.17556 638.43958 292.70929 -63.12188 593.14655 849.27893 -290.36176 579.49982 849.72095 -348.52823 494.61829 757.50031 -329.31458 663.83392 757.27271 -369.01675 412.87817 639.12769 48.92280 717.92279 628.72546 56.67588 434.79495 286.52335 -70.60886 677.75812 284.99628 -80.63718 414.20651 641.44940 60.87712 714.43079 616.01678 67.05805 438.87888 275.21555 -66.24011 676.71594 283.60971 -73.62940 579.22607 757.38654 -349.16565 573.21106 1286.59375 -341.96439 320.73975 637.14020 -142.92694 830.30237 626.71295 -159.50111 398.84448 239.95943 26.18940 705.73944 240.00450 17.66124 395.74524 220.34995 43.76808 705.08453 220.09424 35.88577
8 0.058 578.13776 1549.20618 -222.25487 582.40051 1488.62708 -150.44893 563.43854 1428.05505 -358.14627 424.32397 1281.16406 -338.01248 504.69275 1037.34973 -449.95074 323.10150 924.41321 -317.60114 321.44086 719.20673 -192.83292 722.11096 1292.01538 -345.89407 827.08905 932.07697 -315.98495 829.33258 713.95844 -204.20287 460.96765 849.47150 -259.33499 725.34937 849.09961 -321.37979 538.41718 850.70697 -472.69437 413.97787 755.15112 -34.94693 356.81287 656.34351 38.73965 374.65121 460.17169 19.64787 394.75891 281.44086 -82.75436 444.49722 253.88678 -143.75089 398.84772 239.96091 46.18974 731.01935 747.40405 -44.43204 775.02429 630.84814 47.16449 748.68579 441.71371 -4.51204 717.07800 277.27963 -98.15291 662.75171 257.97250 -148.41019 705.74451 240.00403 37.65928 468.94693 621.91260 59.12523 474.82053 291.59775 -58.49672 661.02661 626.60321 66.20764 638.44537 292.71347 -63.12144 593.15851 849.28558 -290.35739 579.50958 849.72748 -348.51996 494.62836 757.51703 -329.30157 663.83264 757.27905 -369.01025 412.87988 639.12805 48.93244 718.02545 628.72565 56.68607 434.78973 286.51932 -70.62553 677.76172 284.99655 -80.63718 414.20651 641.44977 60.88002 714.46027 616.02570 67.02457 438.88083 275.21591 -66.24341 676.71942 283.61322 -73.62820 579.23053 757.39801 -349.15591 573.21747 1286.58972 -341.95328 320.77661 637.12415 -142.92563 830.22998 626.71100 -159.49004 398.84772 239.96091 26.18974 705.74451 240.00403 17.65928 395.74747 220.35156 43.76857 705.08588 220.09387 35.88390
9 0.067 578.17651 1549.21521 -222.28969 582.43390 1488.65930 -150.47295 563.47302 1428.04272 -358.15457 424.32767 1281.16064 -337.98660 504.69287 1037.35193 -449.93646 323.12003 924.40582 -317.58804 321.46692 719.18964 -192.82539 722.11469 1291.99792 -345.90323 827.06995 932.05707 -316.00714 829.27631 713.94946 -204.20088 460.98596 849.48236 -259.32318 725.35254 849.09692 -321.37781 538.42450 850.71295 -472.68362 413.98325 755.15039 -34.93485 356.80856 656.34283 38.75000 374.65253 460.17136 19.65314 394.75928 281.44540 -82.75931 444.49719 253.88681 -143.75290 398.84872 239.96179 46.18988 731.04626 747.40515 -44.43405 775.06165 630.83972 47.15686 748.69373 441.72217 -4.53473 717.07782 277.27682 -98.15436 662.74664 257.97888 -148.40746 705.74792 240.00320 37.65699 468.94882 621.91400 59.13937 474.80859 291.59039 -58.52081 661.18463 626.61414 66.24427 638.45056 292.71918 -63.12055 593.16925 849.28967 -290.35049 579.51819 849.73193 -348.50974 494.63715 757.53015 -329.28775 663.83173 757.28345 -369.00269 412.87869 639.12842 48.94469 718.12311 628.72693 56.70057 434.78394 286.51788 -70.64006 677.76422 284.99799 -80.63745 414.20435 641.45044 60.88571 714.48901 616.03168 67.00146 438.88034 275.21832 -66.24689 676.72168 283.61658 -73.62720 579.23444 757.40680 -349.14520 573.22119 1286.57922 -341.94492 320.80566 637.10315 -142.92033 830.15887 626.70642 -159.47838 398.84872 239.96179 26.18988 705.74792 240.00320 17.65699 395.74753 220.35260 43.76863 705.08612 220.09315 35.88157
10 0.075 578.22321 1549.22400 -222.32751 582.47699 1488.69202 -150.49860 563.50720 1428.02771 -358.16254 424.32901 1281.15295 -337.96259 504.69214 1037.35120 -449.92270 323.13589 924.39471 -317.57825 321.48663 719.16815 -192.81639 722.11450 1291.97229 -345.91641 827.04889 932.03326 -316.03214 829.22028 713.93781 -204.19936 461.00140 849.48938 -259.30951 725.35577 849.09351 -321.37314 538.43317 850.71783 -472.67126 413.98785 755.15033 -34.91985 356.80209 656.34241 38.76375 374.65222 460.17166 19.66212 394.75781 281.45157 -82.76581 444.49719 253.88823 -143.75554 398.84790 239.96207 46.18972 731.07086 747.40601 -44.43313 775.09540 630.83228 47.15326 748.70258 441.72873 -4.55191 717.07635 277.27521 -98.15665 662.74292 257.98560 -148.40193 705.75006 240.00217 37.65466 468.94724 621.91492 59.15485 474.79852 291.58649 -58.53809 661.32825 626.62622 66.28327 638.45538 292.72696 -63.11906 593.17859 849.29144 -290.34134 579.52557 849.73456 -348.49792 494.64462 757.53943 -329.27344 663.83142 757.28607 -368.99417 412.87466 639.12866 48.95930 718.21185 628.72925 56.71827 434.77817 286.51901 -70.65195 677.76587 285.00107 -80.63786 414.20035 641.45135 60.89395 714.51691 616.03503 66.98815 438.87769 275.22266 -66.25085 676.72290 283.62009 -73.62643 579.23804 757.41278 -349.13379 573.22174 1286.56262 -341.93948 320.82693 637.07751 -142.91167 830.08881 626.69965 -159.46625 398.84790 239.96207 26.18972 705.75006 240.00217 17.65466 395.74594 220.35304 43.76819 705.08551 220.09224 35.87900
11 0.083 578.27698 1549.23279 -222.36746 582.52863 1488.72461 -150.52463 563.54028 1428.01013 -358.16925 424.32782 1281.14099 -337.94067 504.69028 1037.34753 -449.90952 323.14893 924.38000 -317.57095 321.50037 719.14282 -192.80624 722.11029 1291.93872 -345.93335 827.02594 932.00580 -316.06030 829.16455 713.92383 -204.19838 461.01395 849.49280 -259.29468 725.35895 849.08972 -321.36581 538.44214 850.72137 -472.65723 413.99179 755.15063 -34.90194 356.79398 656.34216 38.78064 374.65063 460.17209 19.67440 394.75494 281.45901 -82.77361 444.49719 253.89066 -143.75830 398.84579 239.96194 46.18934 731.09326 747.40674 -44.42930 775.12610 630.82587 47.15374 748.71252 441.73370 -4.56365 717.07404 277.27527 -98.15946 662.73987 257.99319 -148.39445 705.75134 240.00105 37.65257 468.94241 621.91534 59.17197 474.79074 291.58594 -58.54873 661.45306 626.63928 66.32295 638.45990 292.73703 -63.11698 593.18646 849.29126 -290.33026 579.53180 849.73541 -348.48477 494.65106 757.54517 -329.25894 663.83191 757.28723 -368.98447 412.86819 639.12872 48.97631 718.28961 628.73260 56.73835 434.77286 286.52249 -70.66117 677.76697 285.00613 -80.63822 414.19492 641.45233 60.90474 714.54431 616.03619 66.98418 438.87329 275.22855 -66.25517 676.72345 283.62436 -73.62563 579.24152 757.41620 -349.12170 573.21906 1286.53992 -341.93701 320.84094 637.04797 -142.90036 830.02002 626.69104 -159.45361 398.84579 239.96194 26.18934 705.75134 240.00105 17.65257 395.74323 220.35306 43.76741 705.08441 220.09123 35.87645
12 0.092 578.33679 1549.24146 -222.40851 582.58752 1488.75647 -150.54962 563.57141 1427.99048 -358.17395 424.32373 1281.12537 -337.92090 504.68689 1037.34119 -449.89682 323.15894 924.36212 -317.56509 321.50897 719.11420 -192.79524 722.10205 1291.89807 -345.95346 827.00116 931.97491 -316.09143 829.10913 713.90796 -204.19771 461.02386 849.49304 -259.27960 725.36182 849.08575 -321.35577 538.45062 850.72327 -472.64114 413.99512 755.15106 -34.88120 356.78470 656.34204 38.80039 374.64792 460.17215 19.68953 394.75131 281.46768 -82.78207 444.49713 253.89374 -143.76071 398.84296 239.96175 46.18904 731.11365 747.40747 -44.42255 775.15424 630.82031 47.15828 748.72314 441.73746 -4.57037 717.07117 277.27734 -98.16243 662.73627 258.00171 -148.38629 705.75214 239.99992 37.65089 468.93488 621.91522 59.19133 474.78467 291.58798 -58.55484 661.55774 626.65295 66.36219 638.46393 292.74918 -63.11441 593.19287 849.28937 -290.31769 579.53711 849.73468 -348.47064 494.65680 757.54773 -329.24460 663.83313 757.28711 -368.97333 412.85980 639.12860 48.99586 718.35602 628.73663 56.76023 434.76797 286.52783 -70.66846 677.76758 285.01324 -80.63842 414.18823 641.45331 60.91844 714.57098 616.03577 66.98798 438.86786 275.23557 -66.25943 676.72357 283.62967 -73.62444 579.24500 757.41742 -349.10898 573.21289 1286.51172 -341.93719 320.84900 637.01501 -142.88730 829.95233 626.68121 -159.44023 398.84296 239.96175 26.18904 705.75214 239.99992 17.65089 395.73978 220.35303 43.76661 705.08331 220.09024 35.87412
13 0.100 578.40186 1549.24963 -222.44949 582.65216 1488.78711 -150.57217 563.60022 1427.96936 -358.17603 424.31665 1281.10645 -337.90332 504.68170 1037.33264 -449.88440 323.16577 924.34155 -317.55978 321.51340 719.08319 -192.78366 722.08997 1291.85205 -345.97577 826.97473 931.94092 -316.12491 829.05396 713.89044 -204.19691 461.03174 849.49036 -259.26563 725.36426 849.08179 -321.34320 538.45795 850.72333 -472.62244 413.99768 755.15094 -34.85802 356.77472 656.34204 38.82266 374.64441 460.17136 19.70710 394.74734 281.47742 -82.79028 444.49695 253.89722 -143.76239 398.83994 239.96182 46.18920 731.13226 747.40826 -44.41296 775.18036 630.81519 47.16665 748.73407 441.74023 -4.57304 717.06799 277.28156 -98.16524 662.73102 258.01099 -148.37845 705.75275 239.99876 37.64967 468.92526 621.91455 59.21332 474.77927 291.59131 -58.55930 661.64301 626.66669 66.40018 638.46716 292.76270 -63.11161 593.19800 849.28607 -290.30441 579.54193 849.73242 -348.45618 494.66260 757.54755 -329.23114 663.83539 757.28607 -368.96078 412.84998 639.12830 49.01799 718.41168 628.74097 56.78341 434.76331 286.53436 -70.67479 677.76758 285.02213 -80.63842 414.18066 641.45410 60.93499 714.59686 616.03400 66.99803 438.86191 275.24338 -66.26311 676.72363 283.63617 -73.62258 579.24902 757.41681 -349.09598 573.20331 1286.47925 -341.93954 320.85245 636.97980 -142.87320 829.88562 626.67029 -159.42572 398.83994 239.96182 26.18920 705.75275 239.99876 17.64967 395.73602 220.35327 43.76623 705.08234 220.08920 35.87209
14 0.108 578.47131 1549.25720 -222.48918 582.72076 1488.81641 -150.59117 563.62640 1427.94727 -358.17502 424.30673 1281.08459 -337.88788 504.67447 1037.32263 -449.87238 323.16913 924.31873 -317.55481 321.51459 719.05096 -192.77179 722.07440 1291.80212 -345.99945 826.94690 931.90399 -316.15976 828.99902 713.87122 -204.19559 461.03836 849.48492 -259.25415 725.36633 849.07819 -321.32889 538.46375 850.72144 -472.60077 413.99911 755.14996 -34.83310 356.76419 656.34222 38.84704 374.64035 460.16943 19.72668 394.74347 281.48779 -82.79732 444.49649 253.90088 -143.76306 398.83719 239.96240 46.19005 731.14905 747.40918 -44.40086 775.20471 630.81024 47.17823 748.74457 441.74203 -4.57294 717.06488 277.28775 -98.16759 662.72369 258.02081 -148.37170 705.75354 239.99753 37.64889 468.91440 621.91309 59.23785 474.77359 291.59470 -58.56438 661.71069 626.67944 66.43618 638.46930 292.77658 -63.10881 593.20233 849.28156 -290.29150 579.54688 849.72876 -348.44226 494.66934 757.54510 -329.21957 663.83923 757.28473 -368.94742 412.83929 639.12769 49.04244 718.45770 628.74481 56.80721 434.75854 286.54126 -70.68085 677.76709 285.03217 -80.63820 414.17230 641.45490 60.95416 714.62134 616.03156 67.01192 438.85605 275.25140 -66.26572 676.72375 283.64374 -73.61988 579.25427 757.41492 -349.08350 573.19055 1286.44336 -341.94366 320.85278 636.94385 -142.85858 829.81989 626.65808 -159.40991 398.83719 239.96240 26.19005 705.75354 239.99753 17.64889 395.73236 220.35406 43.76654 705.08191 220.08809 35.87038
15 0.117 578.54474 1549.26416 -222.52641 582.79163 1488.84436 -150.60583 563.65009 1427.92480 -358.17072 424.29456 1281.06006 -337.87448 504.66501 1037.31177 -449.86102 323.16849 924.29376 -317.55075 321.51328 719.01855 -192.75987 722.05591 1291.74951 -346.02396 826.91803 931.86444 -316.19513 828.94458 713.85034 -204.19357 461.04453 849.47687 -259.24673 725.36804 849.07532 -321.31409 538.46777 850.71735 -472.57617 413.99902 755.14789 -34.80732 356.75308 656.34271 38.87311 374.63596 460.16629 19.74763 394.74002 281.49814 -82.80238 444.49548 253.90460 -143.76254 398.83502 239.96362 46.19165 731.16418 747.40997 -44.38670 775.22736 630.80518 47.19213 748.75439 441.74289 -4.57114 717.06213 277.29541 -98.16927 662.71423 258.03091 -148.36667 705.75476 239.99619 37.64857 468.90314 621.91058 59.26444 474.76743 291.59735 -58.57062 661.76318 626.69012 66.46952 638.47028 292.78989 -63.10616 593.20630 849.27606 -290.28043 579.55249 849.72382 -348.43018 494.67786 757.54053 -329.21106 663.84497 757.28351 -368.93417 412.82813 639.12665 49.06878 718.49524 628.74762 56.83083 434.75372 286.54776 -70.68650 677.76617 285.04266 -80.63772 414.16318 641.45605 60.97557 714.64423 616.02850 67.02810 438.85080 275.25903 -66.26697 676.72430 283.65210 -73.61635 579.26141 757.41205 -349.07260 573.17523 1286.40479 -341.94922 320.85120 636.90845 -142.84352 829.75519 626.64471 -159.39296 398.83502 239.96362 26.19165 705.75476 239.99619 17.64857 395.72910 220.35553 43.76763 705.08221 220.08687 35.86905
16 0.125 578.62146 1549.27051 -222.56018 582.86310 1488.87097 -150.61574 563.67163 1427.90222 -358.16309 424.28073 1281.03333 -337.86313 504.65335 1037.30042 -449.85071 323.16330 924.26648 -317.54880 321.51001 718.98688 -192.74814 722.03491 1291.69495 -346.04880 826.88837 931.82245 -316.23038 828.89111 713.82758 -204.19090 461.05109 849.46643 -259.24460 725.36914 849.07306 -321.30042 538.46997 850.71112 -472.54938 413.99707 755.14453 -34.78153 356.74164 656.34332 38.90033 374.63120 460.16196 19.76893 394.73721 281.50763 -82.80502 444.49374 253.90822 -143.76080 398.83359 239.96545 46.19401 731.17749 747.41064 -44.37097 775.24823 630.79980 47.20747 748.76349 441.74289 -4.56809 717.06006 277.30377 -98.17017 662.70270 258.04086 -148.36380 705.75653 239.99477 37.64889 468.89230 621.90704 59.29242 474.76117 291.59912 -58.57715 661.80322 626.69775 66.49977 638.46979 292.80176 -63.10352 593.21014 849.26971 -290.27252 579.55890 849.71765 -348.42105 494.68863 757.53442 -329.20654 663.85223 757.28271 -368.92227 412.81696 639.12518 49.09637 718.52576 628.74878 56.85362 434.74918 286.55338 -70.69109 677.76489 285.05276 -80.63685 414.15329 641.45715 60.99905 714.66522 616.02496 67.04523 438.84653 275.26572 -66.26679 676.72546 283.66095 -73.61211 579.27045 757.40857 -349.06439 573.15784 1286.36414 -341.95596 320.84869 636.87506 -142.82788 829.69220 626.62964 -159.37511 398.83359 239.96545 26.19401 705.75653 239.99477 17.64889 395.72650 220.35759 43.76956 705.08307 220.08557 35.86839
17 0.133 578.70099 1549.27661 -222.58966 582.93365 1488.89624 -150.62088 563.69147 1427.87964 -358.15237 424.26590 1281.00500 -337.85379 504.63986 1037.28857 -449.84186 323.15323 924.23657 -317.55035 321.50531 718.95642 -192.73692 722.01172 1291.63867 -346.07379 826.85815 931.77814 -316.26511 828.83917 713.80304 -204.18788 461.05914 849.45355 -259.24893 725.36926 849.07129 -321.28940 538.47040 850.70306 -472.52194 413.99319 755.13983 -34.75653 356.73016 656.34399 38.92785 374.62607 460.15659 19.78937 394.73529 281.51553 -82.80519 444.49127 253.91156 -143.75809 398.83289 239.96767 46.19708 731.18896 747.41101 -44.35427 775.26685 630.79407 47.22346 748.77185 441.74210 -4.56389 717.05878 277.31198 -98.17036 662.68945 258.05014 -148.36348 705.75867 239.99338 37.64999 468.88260 621.90240 59.32095 474.75476 291.59976 -58.58382 661.83362 626.70197 66.52674 638.46808 292.81174 -63.10058 593.21417 849.26245 -290.26917 579.56622 849.71027 -348.41599 494.70236 757.52734 -329.20712 663.86078 757.28265 -368.91302 412.80637 639.12323 49.12440 718.55023 628.74805 56.87510 434.74503 286.55765 -70.69450 677.76343 285.06186 -80.63547 414.14285 641.45819 61.02412 714.68402 616.02069 67.06272 438.84363 275.27087 -66.26540 676.72717 283.66977 -73.60751 579.28156 757.40503 -349.06006 573.13879 1286.32178 -341.96378 320.84613 636.84436 -142.81157 829.63159 626.61298 -159.35699 398.83289 239.96767 26.19708 705.75867 239.99338 17.64999 395.72464 220.36003 43.77228 705.08429 220.08429 35.86864
以下是文本文件的link。
答案 0 :(得分:2)
我认为dlmread
会更好。同样适用于您的情况,因为您声明文件的长度差异很大,因此使用单元格数组将是更好的选择。
hold on;
datacell = cell(numfiles,1); %Pre-allocation
for k=1:numfiles
datacell{k} = dlmread(txtfiles(k), '', 6, 0); %skipping 6 rows and zero columns
plot(datacell{k}(:,5)); %to plot 5th column of each file
end