如何求gamma函数的逆函数?。

4 ビュー (過去 30 日間)
wedojo
wedojo 2022 年 11 月 16 日
回答済み: bacaxok 2022 年 11 月 16 日
finverse可以求一个函数的逆函数,我自己编的程序如下:
syms x
y = gamma(x);
yinv = finverse(y);
subs(yinv,x,6) %求y=6时对应的x,理论值应为4
matlab发出警告:
Warning: finverse(gamma(x)) cannot be found.
不知道大家有没有其它方法求gamma函数的逆函数,谢谢!

採用された回答

bacaxok
bacaxok 2022 年 11 月 16 日
伽马函数不是一一对应的。
同一个值可能有好些答案
gamma(4)=6;gamma(-3.0269)约为6.......
看图 约有5个值
fun=@(x,y)gamma(x)-y;
fzero(@(x)fun(x,6),-3.4),%变换-3.4的初值得到不同的结果。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!