Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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.

Antworten (1)

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

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by