Calculating matrix of associated legendre polynomials?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I am trying to create a 13x13 matrix of the associated legendre polynomials with argument cos(theta), from n=0:12 and m=0:12. I've included the code I've been using, but with doing it symbolically I cant seem to get it to work. If anyone come across this before or has any ideas it would be greatly appreciated. Cheers.
for n = 0:1:12
for m = 0:1:12
if m > n
P(n+1,m+1) = 0;
else
P(n+1,m+1) = ((-1)^m)*(sym(sin(x))^m)*diff((1/(2^n)*factorial(n))*diff((sym(cos(x))^2),sym(cos(x)),n),sym(cos(x)),m);
end
end
end
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!