Exact Superpotentials from Matrix Models