changed bug in matrix generation, also plotting every 100 calculations