Finding the value of x for a corresponding known y value for a curve
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Atheeb Amjard
am 13 Apr. 2021
Kommentiert: Matt J
am 13 Apr. 2021
I have a code for temperature against time step. The time step is dt and temperature is ucn. I used the plot function to plot ucn against dt. I have to find the first value of dt where the temperature crossess the y=143 or y=142 line. i need the value of dt wherever it crosses first
0 Kommentare
Akzeptierte Antwort
Matt J
am 13 Apr. 2021
Bearbeitet: Matt J
am 13 Apr. 2021
find(diff(sign(ucn-143))~=0,1) + 1
2 Kommentare
Matt J
am 13 Apr. 2021
You're quite welcome. Please Accept-click the answer to indicate that a solution to your question was reached.
The code just looks for the first occurence where ucn-143 changes sign, i.e., when diff(sign(ucn-143))~=0.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!