% deg is the row in pascal's triangle bsxfun(@rdivide,factorial(deg),factorial(0:deg).*factorial(deg:-1:0))