Please, check this video: https://www.youtube.com/watch?v=DayF6MF4y7o
Alternatively, you may also use the following commands:
1) textread('filename','format'): textread(filename,format) reads data from the file filename into the variables A, B, C, and so on, using the specified format, until the entire file is read. Specify filename and format inputs as character vectors or string scalars. textread is useful for reading text files with a known format. textread handles both fixed and free format files.
2) dlmread('filename','delimiter'): reads an ASCII-delimited numeric data file into matrix M. The dlmread function detects the delimiter from the file and treats repeated white spaces as a single delimiter.