How to delete data from text file?
Afficher commentaires plus anciens
[71.7 611.7 251.7 431.7] is tab delimited data on 14th line, second data, I want to delete 431.7, How to do it?
1 commentaire
Arun Badigannavar
le 11 Mai 2016
Réponses (1)
Walter Roberson
le 11 Mai 2016
0 votes
You need to read in the data, make the change, and write it out again, preferably to a different file (so that if there is a problem you do not lose the original.)
The only circumstance under which you can alter a text file "in place" is if the replacement is exactly the same size as the original.
Catégories
En savoir plus sur Text Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!