Is there an inverse function alternative to 'eval'?

2 Ansichten (letzte 30 Tage)
Anthony Mottaz
Anthony Mottaz am 7 Mär. 2015
Kommentiert: Star Strider am 7 Mär. 2015
Suppose I have an array of complex numbers z and I want to apply a user defined transformation to this array. For example:
func = input('f(z)=','s');
image = eval(func);
This is all well and good, and I can display the result of this transformation, no problem. But now, I wish to also calculate the inverse transformation of func (I am assuming that anything the user inputs is invertible). Is there a cousin function to eval that can do this for me? I have tried simply doing
invimage = inv(image);
I am not sure what the output of this is, but I am certain it is not the inverse function.
Thank you for your help!

Akzeptierte Antwort

Star Strider
Star Strider am 7 Mär. 2015
If you have the Symbolic Math Toolbox, consider the finverse function. I know of no others that would do it easily, although depending on what the function is, you might be able to do it by hand.
  2 Kommentare
Anthony Mottaz
Anthony Mottaz am 7 Mär. 2015
Thank you so much! I was able to utilize finverse to finagle a solution to my problem.
Star Strider
Star Strider am 7 Mär. 2015
My pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by