How to use readtable/writetable to read and write data from/at a specified range of lines within a text file
2 次查看(过去 30 天)
显示 更早的评论
Hello,
Suppose that we have a text file with separate blocks of headers/data, like the following text file that includes 3 blocks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165818/image.png)
I want to read each data block into a separate table, supposing that I know the beginning and ending line of each block (for example the 2nd blocks begins in line 4 and ends in line 6). Is there a neat way to do this, using the readtable function? The same questions applies for the sequential writing of separate tables to the same text file, specifying the beginning line, within the text file, where I want to write the table.
Thank you in advance
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Naming Conventions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!