%%Some data
x=0:.9:20;
y=x.^2
%%Set threshold
t=200;
yt=[t t]
xt=[min(x),max(x)];
P=InterX([xt;yt],[x;y])
h=plot(x,y,'+-k',...
xt,yt,'r',...
P(1),P(2),'bo')
set(h(3),'markerfacecolor',[1 0 0])
Note that the resolution of the x-range is quite poor, yet the intercep is accurate.
