From: Wen Zhe on
Hi guys (and girls),

I want to lookup a value on a graph i plotted. Let's say distance = 10 mm on the x axis ... how would i be able to find the corresponding value on the y axis from the graph? Note that i don't have any equation for the graph plotted. It is plotted using values data i imported onto Matlab.

Many thanks,

Wen Zhe
From: us on
"Wen Zhe " <wenzhe2092(a)hotmail.com> wrote in message <i2rj7o$pko$1(a)fred.mathworks.com>...
> Hi guys (and girls),
>
> I want to lookup a value on a graph i plotted. Let's say distance = 10 mm on the x axis ... how would i be able to find the corresponding value on the y axis from the graph? Note that i don't have any equation for the graph plotted. It is plotted using values data i imported onto Matlab.
>
> Many thanks,
>
> Wen Zhe

show CSSM your ML code...

us
From: Walter Roberson on
Wen Zhe wrote:

> I want to lookup a value on a graph i plotted. Let's say distance = 10
> mm on the x axis ... how would i be able to find the corresponding value
> on the y axis from the graph? Note that i don't have any equation for
> the graph plotted. It is plotted using values data i imported onto Matlab.

The biggest problem is converting 10 mm into data units. The below code
does not attempt that, as it is effectively impossible to do
programmatically.


xd = get(PlotHandle, 'XData');
yd = get(PlotHandle, 'YData');
y_at_P = interp1(xd, yd, P);