Is there a way to build a matrix that calculates?