Update pregenerateCoeMatrix function to handle 0