A refractometer is an instrument used by brewers to infer the sugar content/alcohol content of wort and beer. It produces similar results to that of a hydrometer, but rather than requiring approximately 100 mL of liquid, it only takes a number of drops. Unfortunately, a refractometer is sensitive to alcohol content, so a correction must be made in order to compare the readings from these two instruments.
I've put together a group of Matlab files that calculate these corrections and plot a number of useful graphs. It's available on the Matlab file exchange here. This is based on beerlib.c, by Domenick Venezia.
Edit: here's an additional chart in case your refractometer reads in SG units and you want to correct for alcohol content: