Calculating matrix of associated legendre polynomials?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Polynomials dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!