How to find x-values when y-function equals a set value?
Afficher commentaires plus anciens
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.

Réponse acceptée
Plus de réponses (2)
KSSV
le 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:
Alan Stevens
le 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];
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
