Legendre polynomials in MatLab

So, due to a HW assignment I work on, I needed to have a fast code that computes the nth degree Legendre polynomial. Looking around, I found out that Matlab has a built-in function, y = legendre(n,x), that calculates the value of  associated Legendre polynomials up to n for x. If x is a scalar, y is a vector. If x is a vector, y is … Continue reading Legendre polynomials in MatLab