readtable() and then writetable() .
Depending how the .txt file is divided internally, it might be easier to use detectImportOptions() before the readtable() .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!