Import parts of large comma decimal txt file
3 次查看(过去 30 天)
显示 更早的评论
I need to import parts of a large txt file that looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/538691/image.png)
I only want the numbers in a period decimal format.
How is the best way to do this? Have tried readtable, but it think the comma is a seperator and i only get the decimal points.
I have attached a reduced size copy of the .txt file.
0 个评论
采纳的回答
Jeremy Hughes
2021-3-4
You can try this after R2020a
readtable(filename,'DecimalSeparator',',')
or earlier
opts = detectImportOptions(filename,'DecimalSeparator',',');
readtable(filename,opts)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!