Calculating matrix of associated legendre polynomials?
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Polynomials についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!