Hi, You can strip the header rows and save a newfile. Then use mfscanf as follows: fid = mopen(newfile); M = zeros(nrows, ncols); for k=1:nrows M(k,:) = mfscanf(ncols,fid,"%f"); end Regards, Rafael