How to I find a x value from a given y?

383 vues (au cours des 30 derniers jours)
Matilde Garcia
Matilde Garcia le 2 Déc 2015
Commenté : Suhel Tamboli le 9 Mar 2021
I have plotted a Matlab graph using a long matrix. I am looking to find the code which gives me an x value from the line graph given a y.

Réponse acceptée

Thorsten
Thorsten le 2 Déc 2015
Modifié(e) : Thorsten le 2 Déc 2015
x(y==yourvalue)
or if you allow for some tolerance
tol = 1e-6;
x(abs(y-yourvalue) < tol)
  4 commentaires
Coryn Melissa LLamoza Carabali
Hi, have the same problem you have. Were you able to get it to work?
Suhel Tamboli
Suhel Tamboli le 9 Mar 2021
Hello, how can I get y values for a range of x values (from a particular x value to another)?

Connectez-vous pour commenter.

Plus de réponses (1)

Salih CIL
Salih CIL le 11 Déc 2018
Thx it is working :)

Catégories

En savoir plus sur Networks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by