Symbolic Associated Legendre Polynomials
조회 수: 18 (최근 30일)
이전 댓글 표시
Hello!
I am trying to create the symbolic associated legendre polynomials of degree n and order m.
I found this forum entry: https://www.mathworks.com/matlabcentral/answers/9485-how-do-i-specify-m-for-orthpoly-legendre but unfortunately MuPad has been removed and I have no idea how I can implement that in the same way.
Is there any possibility? The function legendreP gives me only the unassociated legendre polynomial.
I am currently using Matlab R2018a with the Symbolic Toolbox.
Thank you in advance!
댓글 수: 0
채택된 답변
Masa
2021년 8월 2일
편집: Masa
2021년 8월 2일
associated Legendre functions could be found from Legendre functions according to the following formula
so in MATLAB you can define a function like this
function plm = assocLegendre(l,m)
% get symbolic associated legendre function P_lm(x) based on
% legendre function P_l(x)
syms x;
% get symbolic form of Legendre function P_l(x)
leg = legendreP(l,x);
% differentiate it m times
legDiff = diff(leg,x,m);
% calculate associated legendre function P_lm(x)
plm = ((-1)^m)*((1 - x^2)^(m/2))*legDiff;
end
to get associated Legendre functions in symbolic form.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!