I need to get N x columns(L) matrix of legendre polynomials evaluated over L for arbitrary N.
Is there a better way of computing the matrix than just explicitly evaluating the polynomial vector for each row? The code snippet for this approach (N = 4) is here:
L = linspace(-1,1,800);
# How to do this in a better way?
G = [legendre_Pl(0,L); legendre_Pl(1,L); legendre_Pl(2,L); legendre_Pl(3,L)];
Thanks, Vojta