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
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
2017-8-27
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
2017-8-27
David Goodmanson
2017-8-29
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 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!