Azzera filtri
Azzera filtri

how to convert a text file into mat file having unequal delimiters in each line?

1 visualizzazione (ultimi 30 giorni)
Hi, I am trying to convert a text file (space separated) to mat file. As soon as I apply delimiter command, I receive an error that delimiters are of unequal numbers. For example, first line contains 3 spaces while second line contains 4 spaces. Is there any way to convert text file with unequal delimiters into mat file? I am using following code. Any help would be appreciated and receiving this error. Thanks Code is attached
readtable('filename','Delimiter',' ','ReadVariableNames',false);
Error using readtable (line 143)
Reading failed at line 4. all lines of a text must have same number of delimiters. Line 4 has 2 delimiters while preceding lines have 3.

Risposte (1)

Yasir Ali
Yasir Ali il 3 Nov 2017
cvklpstunc Here is the text file. Thanks

Categorie

Scopri di più su Migrate GUIDE Apps 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