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

1 次查看(过去 30 天)
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.

回答(1 个)

Yasir Ali
Yasir Ali 2017-11-3
cvklpstunc Here is the text file. Thanks

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by