Azzera filtri
Azzera filtri

Split adjacent number from text file

1 visualizzazione (ultimi 30 giorni)
Phat Pumchawsaun
Phat Pumchawsaun il 18 Dic 2017
Risposto: Walter Roberson il 18 Dic 2017
Hi,
I have the number in text file as following;
123456789101112131415AB1 111
123456789101112131415AB2 111
..
.
.
I want MATLAB to separate adjacent number in every three consecutive sequence like below;
123 456 789 101112 131415
Anyway, I've looked at many possible solutions but I don't really have an idea which codes I have to use it to do like that. Are there anyone have an idea?
Thanks Phat

Risposte (1)

Walter Roberson
Walter Roberson il 18 Dic 2017
You can textscan using %3c format (repeated as often as appropriate), or you can regexp() the content with a pattern such as '...' -- but be careful about the blank delimiter.

Categorie

Scopri di più su Data Import and Export in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by