replce all hyphens(-) in .txt file with 0
Afficher commentaires plus anciens
Hi
I am having numeric data in the form of 10*8 array in .txt file. The data is having 2 rows of hyphens which are causing problem in reading this data. I want to raplace hyphen(-) with zero (0).
Again one thing as data is having negative numbers also, so we have to replace -,(hyphen followed by comma which is delimiter) with 0, sothat negative numbers will remain intact.
So how can I do this replacement? Something like 'regexprep'.. but I want to replace all hyphens in .txt file.
Thanks in advance.
3 commentaires
Fangjun Jiang
le 15 Sep 2011
Provide an example and then we can start from there.
Walter Roberson
le 15 Sep 2011
To cross-check: the hyphen-comma should be replaced by zero-comma ?
Nikhil CD
le 16 Sep 2011
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!