matrix.lib loads: nctools.lib, poly.lib, random.lib