How to find x-values when y-function equals a set value?
Mostrar comentarios más antiguos
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.

Respuesta aceptada
Más respuestas (2)
KSSV
el 16 de Oct. de 2020
0 votos
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 comentario
Coryn Melissa LLamoza Carabali
el 18 de Oct. de 2020
Alan Stevens
el 16 de Oct. de 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 comentario
Coryn Melissa LLamoza Carabali
el 18 de Oct. de 2020
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
