how to made a ".mat" file from ".txt"
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Réponses (1)
Walter Roberson
le 22 Mar 2013
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 commentaires
Walter Roberson
le 22 Mar 2013
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 ?
Voir également
Catégories
En savoir plus sur Language Fundamentals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!