finverse for function handle

4 ビュー (過去 30 日間)
Virginie Marchionni
Virginie Marchionni 2018 年 3 月 29 日
回答済み: Birdman 2018 年 3 月 29 日
Do anyone know how to manage the computation of the inverse of a function handle?
  1 件のコメント
John D'Errico
John D'Errico 2018 年 3 月 29 日
If we are being asked to know how to invert ANY possible function handle, thus solve any possible problem, the answer is it is not possible.
If an inverse theoretically exists, then you MAY be able to use fsolve or fzero. That would require the use of starting values, supplied by you. And the solution would be only as good as those starting values.
If by "inverse" you mean something completely different, such as compute the multiplicative inverse of the output of a function handle, then just write it as another function.

サインインしてコメントする。

採用された回答

Birdman
Birdman 2018 年 3 月 29 日
As far as I know, there is no ready tool for that, but you can define a process where your function handle is converted to symbolic, taken inverse in symbolic form and then convert it back to a function handle. Try this:
f=@(x) x^2+5
g=sym(f) %converted to symbolic
h=finverse(g) %inverse of the function
F=matlabFunction(h) %converted to function handle

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStability Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by