Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Inverse of Function in Matlab

Subject: Inverse of Function in Matlab

From: Mehdi bahonar

Date: 18 Apr, 2010 17:15:21

Message: 1 of 4

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


 

Subject: Inverse of Function in Matlab

From: Rune Allnor

Date: 18 Apr, 2010 17:41:29

Message: 2 of 4

On 18 apr, 19:15, "Mehdi bahonar" <mehdi...@yahoo.com> wrote:
> 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.

What answer would you suggest the inverse of

sin(x) = 0

should provide?

Rune

Subject: Inverse of Function in Matlab

From: John D'Errico

Date: 18 Apr, 2010 18:53:04

Message: 3 of 4

"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.
>

I'm not sure if you mean the multiplicative inverse,
which would come from 1./f, or the functional
inverse, which you would get from fzero. (Yes,
fzero will give you an inverse. Subtract off the
target y value to make fzero work here.)

John

Subject: Inverse of Function in Matlab

From: Roger Stafford

Date: 18 Apr, 2010 19:17:05

Message: 4 of 4

"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

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us