k=249;
for fcr=1:255
  % get generator polynom
  g=rsgenpoly(255,k,285,fcr);
  % reed-solomon encode
  e=rsenc(gf([zeros(1,k-1) 1],8,285), 255, k, g); 
  % single error
  e(1)=e(1)+1;
  % attempt to decode
  d=rsdec(e,255,k,g);  
  fprintf("success with fcr=%d\n",fcr);
end
