Filter löschen
Filter löschen

How do I solve solve a function, y=f(x), for x given y?

2 Ansichten (letzte 30 Tage)
David
David am 10 Okt. 2014
Kommentiert: Star Strider am 10 Okt. 2014
I'm new to Matlab. This seems like a very easy problem, but I don't know how to write it in Matlab. I created models for many datasets. The model takes the form y = 1/(A+exp(B*x-C))-D+1/(E+exp(F*x-G)). (The model looks like a straight line with depression in it). In the model, x is time. I want to determine how much time it takes to get halfway from the minimum to the asymptote on either side. I can put the function in Matlab, find the minimum, asymptotes, and the halfway point for the left side of the depression. I am totally stumped on how to find the the halfway point for the right side. I know what the y value is, but the 'solve' function will only return the x-value for the left side. How do I determine the time from the minimum to halfway to the asymptote on the right side? I can provide some numbers and parameter values if that would be helpful.
  1 Kommentar
Star Strider
Star Strider am 10 Okt. 2014
Parameter values would help. Guessing at them doesn’t produce the curve you describe.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Michael Haderlein
Michael Haderlein am 10 Okt. 2014
I didn't check the equation in detail, but if you know the y value you're looking for, you basically just need to find the root of equation minus y value. Assume the y value you're looking for is 3, then you can use
x=fzero(1/(A+exp(B*x-C))-D+1/(E+exp(F*x-G)) - 3,1);

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by