I am trying to solve the following Weibull function for x given y.
f=fit(edges, binMean, 'Weibull', 'StartPoint', [0.01, 2]);
Obviously it's easy to solve for y given x.
y=f(0.77)
But how can I do the reverse? I want to know x when y is 0.77.

 채택된 답변

Matt J
Matt J 2020년 10월 8일

0 개 추천

x=fzero(@(x) f(x)-y, 0.5 )

댓글 수: 4

Thanks Matt. Just tried this as
x=fzero(@(x) f(x)-0.77, 0.5 )
but it gave me 0.6332
This doesn't appear to work as the correct value is about 0.07.
The equation curves downwards later and 0.6332 is another root.
Give a different starting guess, such as
x=fzero(@(x) f(x)-0.77, 0.1 )
Kait Clark
Kait Clark 2020년 10월 8일
Ahhh makes sense! That did it! THANK YOU!
Or give the interval of interest for x, e.g.,
x=fzero(@(x) f(x)-0.77, [0,0.25])

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2020년 10월 8일

댓글:

2020년 10월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by