How can I find the exact y-coordinate of the red gaussian at x = 0.5 without using Data Cursor?
I want the blue line to end when it touches the gaussian. But I need to find the point of intersection between the gaussian of the histfit
shown in red, and the blue line at 0.5. I can access the data points of the histfit
plot as follows:
C = get(get(gca, 'Children'), 'YData');
C{1,1}
line([0.5 0.5],[0 max(C{1,1})],'Color','b');
However, the data points of the gaussian don't relate to this axes. Meaning, x-axis of C{1,1}
is from 1 - 100 and not from 0.1 to 0.9.
Whats the easiest way to find the y-coordinate of the gaussian at 0.5 so that I can replace max(C{1,1})
by that?