function [matrix] =  load_mx(fname)

fid = fopen(fname,'r');

c=fscanf(fid,'%c',1);
no_rows=fscanf(fid,'%d',1);
c=fscanf(fid,'%c',1);
c=fscanf(fid,'%c',1);
c=fscanf(fid,'%c',1);
no_cols=fscanf(fid,'%d',1);
c=fscanf(fid,'$c',1);
c = fscanf(fid,'%c',1);
matrix = zeros(no_rows,no_cols);
for i=1:no_rows
  for j=1:no_cols
    matrix(i,j) = fscanf(fid,'%e',1);
  end
end
fclose(fid);
