The problem is the format specifier i
, which is not recognized by textscan
. In case you wanted to indicate an integer, you should've used d
. The correct syntax is therefore:
n_xyz = textscan(n_xyz_file, '%5d%5d%10.4f%8.1f%10.4f%8.1f%10.4f%8.1f');