Hello Jungbae. This isn't the most elegant solution, but it'll do the trick if you just need to repeat this task. Just replace the 'your_file_name.txt' with whatever you've named your file.
fileID = 'your_file_name.txt';
raw = fileread(fileID); % Read in file as characters
raw = strrep(raw,sprintf('\n'),''); % Remove newline characters
raw = strrep(raw,sprintf('\r'),' '); % Replace carriage returns with spaces
raw = strrep(raw,sprintf(' '),' '); % Remove any double spaces leftover
val = reshape(str2num(strrep(raw,sprintf(' '),' ')),[6,6]); % Create a 6x6 numeric array
Please let me know if you have any questions!