How to find x-values when y-function equals a set value?
Show older comments
Hi, there!
New to matlab.. I have a dilema trying to find the x-values for a function =0.7(see figure). And I should be able to find both values of x when the bell-curve changes.
Big help, please! I've tried fzero, and other functions and mostly does't work or it will just give me one single value of x. there should always be 2.
Thank you in advance!
x=[0.46 0.7]
f=(a1*exp(-((x-b1)/c1).^2))=0.7
The a1, b1 and c1 values are known.

Accepted Answer
More Answers (2)
KSSV
on 16 Oct 2020
0 votes
You can take your curve as L1 and define your straight line at y = 0.7 as curve L1 and use InterX. Get the function InterX from:
1 Comment
Coryn Melissa LLamoza Carabali
on 18 Oct 2020
Alan Stevens
on 16 Oct 2020
With your particular function you can get both values of x immediately from
x = b1 + c1*sqrt(log(a1/0.7))*[1, -1];
1 Comment
Coryn Melissa LLamoza Carabali
on 18 Oct 2020
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!