Your question is not clear.
.txt is a stupid default windows extention. It is used to either to save files
with numbers or text.
If the file has numbers (the same number of fields per line), than rename it
to .dat and just use the load command, e.g.
load your_file.dat
use this code and if u have any problem post it
i=sprintf('%s',x,'.txt'); % read the name of text file (x=text file name).
H=textread(i,'%s','delimiter','\n','whitespace',''); read text file