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

301 Ansichten (letzte 30 Tage)
Matilde Garcia
Matilde Garcia am 2 Dez. 2015
Kommentiert: Suhel Tamboli am 9 Mär. 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.

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Salih CIL
Salih CIL am 11 Dez. 2018
Thx it is working :)

Kategorien

Mehr zu Networks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by