That's strange. You can try dlmread
instead:
array = dlmread('file.txt', '\t');
Also note that dlmread
is a native MATLAB function and doesn't require the Statistics Toolbox.
Question
I have tried the following approach:
array = tdfread('file.txt');
The structure of the file is:
value1\tvalue2\tvalue3...
where each value can be -1 or 1.
Anyway the result obtained is:
array =
x0x2D1: ''
x0x2D11: ''
x0x2D12: ''
x0x2D13: ''
x0x2D14: ''
x0x2D15: ''
x0x2D16: ''
x0x2D17: ''
x0x2D18: ''
x0x2D19: ''
x0x2D110: ''
x0x2D111: ''
x0x2D112: ''
x0x2D113: ''
x0x2D114: ''
x0x2D115: ''
x0x2D116: ''
x0x2D117: ''
x0x2D118: ''
x0x2D119: ''
x0x2D120: ''
x0x2D121: ''
x0x2D122: ''
x0x2D123: ''
x0x2D124: ''
x0x2D125: ''
x0x2D126: ''
x0x2D127: ''
x0x2D128: ''
x0x2D129: ''
...
I do not know where is the mistake.
Thanks
Solution
That's strange. You can try dlmread
instead:
array = dlmread('file.txt', '\t');
Also note that dlmread
is a native MATLAB function and doesn't require the Statistics Toolbox.