clear all
fclose('all');
echo on

fid = fopen('square_mat.txt', 'wt');
fprintf(fid, '%s\n', 'This is a square matrix');
fprintf(fid, '%i\t%i\t%i\n', [1 2 3; 4 5 6; 7 8 9]');
fclose(fid);


fid=fopen('square_mat.txt', 'rt');
title = fgetl(fid);
[data,count]=fscanf(fid, '%i');
data = reshape(data, 3, 3);
data_transpose = data';
fclose(fid);

echo off
