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 CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by