% FUNCTION [ELEMENT_TYPE, MATRIX_SIZE] = READ_MATRIX_HEADER(FID)
%
% see READ_MATRIX
% 
% by Guillaume LATHOUD at IDIAP (lathoud@idiap.ch)

function [element_type, matrix_size] = read_matrix_header(fid)

s = fgets(fid);
if ~ischar(s)
  error('read_matrix_header encountered unexpected EOF!');
end
element_type = sscanf(s, '%s', 1);

s = fgets(fid);
if ~ischar(s)
  error('read_matrix_header encountered unexpected EOF!');
end
matrix_size = sscanf(s, '%d')';
