how to made a ".mat" file from ".txt"
1 回表示 (過去 30 日間)
古いコメントを表示
the ".txt" file's content is as below:
Date--------OpenPrice------HighPrie-----LowPrice----ClosePrice------Volume
2012/3/8----6.18-------------6.28-----------5.68-----------6.09-----89573650
2012/3/9----6.01-------------6.21-----------5.95-----------6.03----895738396
2012/3/12--6.03-------------6.09-----------5.87-----------6.89----895738698
2012/3/13--5.9--------------6.16------------5.9------------6.04-----895738356
Just now I load "disney.mat" in matlab conmmand window and I find that there are 8 variables in total as below:
dis <782 X 5 fints>
dis_CLOSE <782 X 1 double> NaN
dis_HIGH <782 X 1 double> NaN
dis_LOW <782 X 1 double> NaN
dis_OPEN <782 X 1 double> NaN
dis_VOLUME <782 X 1 double> NaN
dis_nv <782 X 4 fints>
q_dis <13 X 4 fints> NaN
how can I get '.mat'like this
1 件のコメント
回答 (1 件)
Walter Roberson
2013 年 3 月 22 日
You cannot get that desired output from that input. You have matches for dis_CLOSE, dis_HIGH, dis_LOW, dis_OPEN, and dis_VOLUME, which leaves only the one column "Date" to account for dis (which has 5 items of information per line) and dis_nv (which has 4 items of information per row) and q_dis (which has a completely different number of rows than anything else.)
3 件のコメント
Walter Roberson
2013 年 3 月 22 日
I do not know. Is it possible that the 5 fints stored in "dis" corresponds to the 5 columns of values, such as OpenPrice and HighPrie ?
参考
カテゴリ
Help Center および File Exchange で Special Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!