function [errVec, len] = read_mcmc_dat(fname, N)
fid = fopen(fname, 'r');
len = 0;
errVec = zeros([N 4]);
for i=1:N,
  
  [com, count] = fscanf(fid,'%s',3);
  if count ~= 3,
     break;
  end
  [com_num, count] = fscanf(fid,'%f',4);
  if count ~= 4,
     break;
  end
  len = len+1;
  errVec(len,:) = com_num';;
end;
fclose(fid);
return;
