Calculating matrix of associated legendre polynomials?

4 ビュー (過去 30 日間)
Alan
Alan 2012 年 6 月 19 日
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 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by