Legendre function with complex variables

Hi,
I'm doing a project that needs to use Legendre function with complex variables. But the built-in function Matlab has requires real inputs: P(N,X), can't even evaluate the Legendre function in a higher degree. Why don't they have the more general Legendre function?
Afterward, I tried to use the hypergeometric function 2F1 to write the required Legendre function, I found one .m file created by Chris Arcadia - Brown University - 09/10/2016, he employed the Gamma function to calculate the hypergeometric2F1, but I noticed that the built-in Gamma function Matlab has also can't use complex variables as input...
I really want to know why they're not willing to create more general built-in functions.
I really need helps on this issue. Thanks!

답변 (1개)

Walter Roberson
Walter Roberson 2017년 8월 27일

0 개 추천

You will need to contact Mathworks Sales and enter into a Non-Disclosure Agreement in order to get the explanation. Few of the volunteers who answer questions here work for Mathworks, and we certainly would not be authorized to explain why Mathworks made a particular decision: you need an authorized person from Mathworks to tell you why Mathworks did or did not do something.
The why or why not of their decision has never mattered to me, as I have simply used the Symbolic Toolbox when I needed to use complex arguments to Legendre polynomials.

댓글 수: 4

Ying
Ying 2017년 8월 27일
Hi, First, Thanks very much for the reply.
You're right, I shouldn't ask why. However, I already have the Symbolic Toolbox installed. The only Legendre related function they provide is Legendre polynomial which requires an integer as the input for n. You can check. They don't even have Legendre function using real numbers as input for n.
Thanks anyway.
Walter Roberson
Walter Roberson 2017년 8월 27일
편집: Stephen23 2017년 8월 27일
It is not that you should not ask why, it is that this venue is not a place where that can be answered.
LegendreP = @(n, x) hypergeom([-n, n+1], [1], 1/2-(1/2)*x)
which uses the symbolic toolbox hypergeom. When I test the results against a different software package, using complex arguments, I get the same results to within the significant figures I use.
Ying
Ying 2017년 8월 27일
Oh! Thanks very much for the example. Looks like that my problem is my ignorance.
I hope we haven't all decided that to even ask why is forbidden. Pointless, maybe.
Actually I don't think it's even necessary to ask why Mathworks has a somewhat casual approach to special functions. The demand, backed by purchases, is not big enough to justify making a toolbox for that purpose.
As long as there are lots of people willing to pay for, say, the financial toolbox so that they can use Black-Scholes to make large amounts of money, Mathworks will continue to expend their efforts in those kind of directions. And who can blame them? It makes sense to concentrate on growing fields with lots of customers, such as like image processing, neural networks, wireless communication, etc.
Let's face it, from a management perspective, special functions lack a certain je ne sais quoi. Meanwhile due to admirable personal initiative by contributors and Mathworks's support, the file exchange on this site does offer some of the functionality you are looking for.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2017년 8월 26일

댓글:

2017년 8월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by