load命令的使用问题
在神经网络一段程序里:P_TestData=[ 一堆数据
]
P_TestData=P_TestData';
可以正常运行。我把那 一堆数据 拷到txt文件里,111.txt,放在current directory目录下,然后用命令:
load 111.txt;
P_TestData=;
P_TestData=P_TestData';
就出错了:??? Error using ==> load
Number of columns on line 2 of ASCII file C:\MATLAB7\work\111.txt
must be the same as previous lines.
请问怎么修改。 错误不是提示111.txt文件里的第二列有问题? 但是直接用
P_TestData=[ 一堆数据]
P_TestData=P_TestData';
就可以。
把数据拷贝后就不行。 0.493650109 0.427856095 0.822124404 0.494126276 0.737880008 0.319617463 0.763536507 0.525982153 0.804138598 0.854123003 0.461822396 0.591056554 0.745062959 0.867661502 0.839092647 0.871410697 0.960402938 0.996895891 0.864357905 0.648151521 0.785017293 0.903468001 0.518037762 0.128456586 0.544284296 0.373217548 0.670111979 0.28 1;
0.81443929 1 1 1 0.834560751 1 0.766265457 0.624479584 1 0.881137262 1 0.2786692 1 1 0.859206066 0.866052809 0.939284506 0.959646579 0.814384501 0.667000546 0.79608258 0.945298534 1 0.199284494 0.989451025 1 0.882988437 0.2 0.698133995 ;
0.58485364 0.775176916 0.903594439 0.736646304 0.8551534 0.830398401 0.820844451 0.666924179 0.914926367 0.918957224 0.683882995 0.585376784 0.869813651 0.896609305 0.909489614 0.914273798 0.883848619 0.996895891 0.707298636 0.654434529 0.871958829 0.901859135 0.618225753 0.094843341 0.546394091 0.683181773 0.665882645 0.25 1 ;
0.579429363 0.776896211 0.885971917 0.708733239 0.828278248 0.796052081 0.812657602 0.791827612 0.907192401 0.902748669 0.694535104 0.505860003 0.816403866 0.944328087 0.87429113 0.930347461 0.873289403 0.996895891 0.685881463 0.654434529 0.887766381 0.913121201 0.674934925 0.091241922 0.626566298 0.893165947 0.677160868 0.25 0.99034234 ;
0.420611597 0.362647289 0.694197414 0.6729317 0.43422569 0.292039794 0.631182446 0.190314712 0.675173402 0.616397526 0.340509123 0.545618393 0.549354945 0.606320045 0.642986811 0.630305753 0.881208815 0.962750688 0.707298636 0.610453469 0.887766381 0.942080801 0.567592564 0.067232462 0.373390907 0.502669062 0.455825743 0.27 0.708338676 ;
0.388065939 0.421406718 0.737735409 0.718442131 0.415727209 0.540451555 0.657107469 0.209754935 0.740912119 0.638008933 0.589580499 0.30706805 0.712922409 0.793218609 0.637958456 0.657095191 0.886488423 0.944126033 0.714437694 0.585321435 0.871958829 0.913121201 0.766074666 0.136859897 0.675091581 0.812119424 0.870300436 0.29 0.743106251 ;
0.600874177 0.820586526 0.896338106 0.613464736 0.547310746 0.389221244 0.64346272 0.193392748 0.926527317 0.729857413 1 0.210511959 0.813065755 0.976140609 0.698298713 0.732105618 0.865369991 0.972063016 0.678742405 0.616736478 0.898831667 0.911512335 0.841011786 0.283317606 1 0.815803356 0.935150218 0.22 0.631077398 ;
0.484819892 0.62428351 0.831031114 0.670504477 0.478203212 0.366856198 0.602528474 0.194526761 0.818251785 0.681231747 0.939494405 0.30706805 0.752979747 0.864796783 0.658071875 0.769610831 0.918166073 0.953438361 0.75727204 0.616736478 0.829278439 0.911512335 0.833923139 0.148864627 0.961830091 1 0.902725327 0.27 0.68322876 ;
0.350600589 0.373165328 0.759504407 0.666256836 0.420962628 0.335971134 0.556136329 0.259332422 0.698375302 0.692037451 0.413590424 0.630814945 0.696231852 0.769359218 0.637958456 0.641021528 1 0.984479454 1 0.597887452 0.769209741 0.958169467 0.685061563 0.085239557 0.707364031 0.728436551 0.543231971 0.34 0.830025189 ;
0.693339167 1 1 1 1 1 0.695312765 1 1 1 1 1 0.759655971 0.817078001 0.773724035 0.748179281 0.875270685 1 0.738611354 0.641868512 0.890927891 0.903468001 0.726580778 0.058829151 0.748078601 0.422449566 0.668702201 0.27 1 ;
0.38428156 1 1 1 0.956486268 0.941347695 0.524178631 0.926179974 1 0.976229766 1 0.432543377 0.978383112 0.982121571 0.949315845 0.97099892 0.955199272 0.665525338 0.967417692 0.979624982 0.938350547 0.976765628 0.988620024 0.935691833 0.859847986 0.642518989 0.989318385 0.29 0.978764281 ;
0.355772573 0.905021116 0.938005708 0.82444299 0.945607835 0.923160934 1 0.881347812 0.965517154 0.970947492 0.928304388 0.494223445 0.929384834 0.941106351 0.965154643 0.941091556 0.946239126 0.653789385 0.880531539 0.959249963 1 1 0.977240047 0.893891524 0.783401432 0.629975796 0.954221649 0.29 0.936292844 ;
0.356781741 0.908557564 0.959357661 0.880657618 0.872994294 0.821428738 0.926411108 0.807797859 0.967084556 0.930450057 0.974357044 0.40787135 0.907287571 0.974759865 0.89863169 0.928403584 0.940265696 0.466014136 0.934835385 0.979624982 0.980601641 0.985013876 0.98577503 0.876206778 1 0.429284702 0.998474055 0.29 0.891166941 ;
0.355898719 0.904768513 0.968045697 0.907400499 0.950140515 0.933049985 0.957157152 0.890530303 0.966039621 0.971827871 0.926211085 0.494223445 0.974059735 0.930589628 0.958819124 0.962842366 0.952212557 0.624449502 0.967417692 0.959249963 0.964436342 1 0.977240047 0.874599074 0.855331739 0.598617812 0.954221649 0.29 0.978764281 ;
0.352240486 0.894411773 0.946840999 0.851003947 0.951953587 0.934754994 0.963457571 0.989197069 0.959770013 0.97270825 0.911557968 0.518895472 0.91353245 0.954778091 0.904175269 0.996374865 0.934292266 0.642053432 0.923974615 0.969437472 0.99191735 0.998326515 0.982930036 0.926045608 0.840366057 0.617432602 0.948117869 0.3 0.989382141 ;
0.324740666 0.789833959 0.904578857 0.739666237 0.796120033 0.714581515 0.880040026 0.691486305 0.921629895 0.887311485 0.885915011 0.420207364 0.876063178 0.88379021 0.848739475 0.907559058 0.928318835 1 0.902253077 0.959249963 1 1 0.980085041 1 0.7206406 1 1 0.3 0.899130336 ;
0.348708399 0.877234741 0.958032367 0.875563736 0.948327443 0.926343617 0.967237822 0.910875822 0.956635208 0.97270825 0.897428175 0.518895472 0.951001721 0.922702085 0.981785382 0.937466421 0.952212557 1 0.956556923 0.979624982 0.998326665 0.998306679 0.988620024 0.922456197 0.8603203 1 0.959585384 0.3 1 ;
0.369270191 0.95705742 1 1 0.943794762 0.920773921 0.964969671 0.908175089 0.983803512 0.969186734 0.985346882 0.457215404 0.988470993 0.942158023 0.960403004 0.958310948 1 0.80976513 1 0.979624982 0.968206638 1 0.988620024 0.951535123 0.935148711 0.792443324 0.996891183 0.29 0.975119136 ;
0.380623328 1 1 1 1 1 1 1 1 1 1 0.481887431 1 0.969501503 1 0.995468581 0.987570537 0.726061788 0.967059938 0.989812491 1 1 0.994310012 0.886915287 1 0.701118387 0.982901509 0.29 1 ;
0.35930466 1 1 1 1 1 1 1 1 1 1 0.444879391 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.3 1 ;
回复 #2 xinyuxf 的帖子
数据不变,只是拷贝一下,就不行了。 晕,把111.txt的每一行最后的“;”去掉回复 #6 xinyuxf 的帖子
谢谢啊,但是去掉以后又出新错误了:??? Error using ==> network.sim
Inputs are incorrectly sized for network.
Matrix must have 29 rows.
Error in ==> BP at 177
y=sim(net,P_TestData) 转置一下看看
回复 #8 sffei 的帖子
转 过了啊回复 #6 xinyuxf 的帖子
帮忙帮忙,谢谢 原帖由 net77 于 2007-5-13 13:37 发表 http://www.chinavib.com/forum/images/common/back.gif帮忙帮忙,谢谢
没代码没数据叫人怎么帮你,而且你要试着看提示自己解决。 原帖由 net77 于 2007-5-13 13:37 发表 http://www.chinavib.com/forum/images/common/back.gif
帮忙帮忙,谢谢
请先看看置顶贴,然后再看看里面提到的精华贴,相信你能找到答案
页:
[1]