Select/ Short rows from ASCII files
显示 更早的评论
Hello,
I work with very large ASCII file, as the below sample
STOCK DATE TIME PRICE
ETE 04/01/2010 10170000 18.54 430 Big Cap
ABC 04/01/2010 10190000 18.34 200 Big Cap
YYY 04/01/2010 10200000 18.34 100 Big Cap
which is TAB delimited and sorted by TIME as above.
How can I select rows with respect to the column 'STOCK'
for instance selecting only the rows for the stock 'ABC' ?
In case these are not then sorted by time, how can I sort them by TIME?
Many thanks in advance.
Panos
采纳的回答
更多回答(1 个)
Pap
2011-9-14
0 个投票
1 个评论
Fangjun Jiang
2011-9-14
Yes. xlswrite() can write a cell array to an Excel file which I think would be better for this type of information. You can also use csvwrite(), dlmwrite() to write to an ASCII text file.
类别
在 帮助中心 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!