How can I find and replace strings in a text file?
Afficher commentaires plus anciens
Hi,
I've written my table to a text file; however, I need this text file to be delimited by three spaces, which MATLAB doesn't allow using the 'writetable' function. Therefore, I must find and replace each instance of the ' ' string with the ' ' string in my text file. I also need to replace the first line of my text file with another string. How can I accomplish this?
I've tried to use textscan for this, but I keep getting the following error:

For visual clarity, here is what I am trying to accomplish with my text file:
(original)
(goal)Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Characters and Strings 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!