How to find X Value given Y value and show the point on a plot
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matlab_Student
am 8 Okt. 2017
Kommentiert: Onu Student
am 5 Nov. 2020
I have an semilog plot below.
%
x = 0:1:25;
y = exp(-0.03*x);
figure;
semilogy(x,y);
%
I want to let the program calculate the x value when y=0.5 and indicate this point (x,0.5) on the plot with dashed lines connecting to the two axes. How do I achieve this?
0 Kommentare
Akzeptierte Antwort
KSSV
am 9 Okt. 2017
x = 0:1:25;
y = exp(-0.03*x);
figure;
semilogy(x,y);
%
yi = 0.5 ;
xi = interp1(y,x,yi) ;
hold on
semilogy(xi,yi,'*r')
4 Kommentare
Coryn Melissa LLamoza Carabali
am 14 Okt. 2020
yes! looking for both questions above. Anybody that can help with this ;(
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations 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!