Symbolic Associated Legendre Polynomials
12 次查看(过去 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!