TEXTREAD retunrs a cell array.
Read the documentation about this :
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f2-67323.html
To get the first elements of M :
M{1}
Jérôme
Hi,
AFAIK, you can't store integers with leading zeros in a matrix.
You can try something like this :
M=dlmread('sample.dat');
sprintf('%04d\n',M(:,1))
Jérôme