|
"Mehdi bahonar" <mehdiuoc@yahoo.com> wrote in message <hqfen9$hlg$1@fred.mathworks.com>...
> Hi Dear Guys,
>
> I have a question regrading the inverse of function in Matlab. how can we get the inverse of a function. I couldn't find any option to get the inverse of function. There is a option as "finv" which gets inverse of a cumulative function and it isn't applicable for my case.
>
> Thanks,
> Mehdi
Think about what you are asking, Mehdi, when you say, "get the inverse of a function". If it is a function as defined in matlab, you would be asking for another function to be automatically created to give the inverse of a function which has been created in an m-file or built in. There is no way this could be done without consulting the contents of that original function file. To depend only on making calls to the function inherently limits one to a finite number of samples and a perfect inverse cannot be based on only a finite number of samples. Furthermore, if the contents were to be made accessible, the notion of automatically finding its inverse is mind-boggling - perhaps something that a modern-day Godel might very well prove to be theoretically uncomputable. Certainly Mathworks is not going to attain it any time in the near future.
If one wants only an approximate inverse which could in principle be based on some finite number of samples, that implies that the inverse function, if it is to be used successfully, has already undergone an initial table-preparation phase and is now all ready to operate without further samples being taken making use of interpolation techniques. Such a idea seems conceivable but as far as I know, no-one at Mathworks has ever come up with such a grandiose scheme. As you might guess, there are great stumbling blocks to accomplishing it, such as how to deal with cases of the kind Rune suggests where the inverse is ill-defined. No matter how many samples might have been taken, how is such procedure to be sure that the next sample might come up with an aspect that has not been anticipated? Just off the end of the table maybe something horrific happens?
In mathematics developing the inverses to specific functions has occupied mathematicians for a great many generations and they are certainly not finished with the task.
Roger Stafford
|