INVERSE OF A FUNCTION

10 ビュー (過去 30 日間)
george veropoulos
george veropoulos 2020 年 12 月 16 日
コメント済み: george veropoulos 2020 年 12 月 21 日
HI i m looking for a script to inverse numericall a function
i use the function of inverse but not working because the functio is a liitle complicate
y=a*sin(x-ψ)+b*exp(-x/c) a,b,c are constand
thank you
  2 件のコメント
Alan Stevens
Alan Stevens 2020 年 12 月 17 日
The right-hand side of your expression will result in an infinite number of values of y, so there won't in general be a unique inverse value. However, if you know the range of values of x that you are interested in then you might be able to get a corresponding value for y using, say, the function fzero.
doc fzero
george veropoulos
george veropoulos 2020 年 12 月 17 日
thank you for your reply
the x is angle from 0 to 180 degree
a graph of y is as follow
how i can use fzero ?
George

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

採用された回答

Alan Stevens
Alan Stevens 2020 年 12 月 18 日
For a gven target value of y you could write a script along the lines of
x0 = initial guess;
x = fzero(@fn, x0);
function z = fn(x)
a = ...
b = ...
etc.
z = a*sin(x-psi)+b*exp(-x/c) - ytarget;
end
fzero will return the value of x that makes z equal zero (to within the appropriate tolerance).
  1 件のコメント
george veropoulos
george veropoulos 2020 年 12 月 21 日
I m trying also the mupad and find the many solution

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

その他の回答 (1 件)

george veropoulos
george veropoulos 2020 年 12 月 18 日
thank you
i have a mistake my relation and i see the the function is not one-one in range from 0:360
is one-to one in range from 0 to 180 degree

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by