How to read a text file from MATLAB? Well, it’s simple. Just this:
array = textread('filename');
The array variable may holds a multidimensional matrix. If your file, for instance, has 3 columns where 1st one are formed by float-point, the 2nd one by integer and the 3rd one formed by string, you can do this:
[a, b, c] = textread('filename', '%f%d%s')
Each a, b and c are arrays of each type: float, decimal and string.