<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255285</link>
    <title>MATLAB Central Newsreader - Find corresponding y coordinates for given values of x in an image</title>
    <description>Feed for thread: Find corresponding y coordinates for given values of x in an image</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 04 Jul 2009 01:10:57 -0400</pubDate>
      <title>Find corresponding y coordinates for given values of x in an image</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255285#662563</link>
      <author>Ashvin</author>
      <description>I will try to explain what I am trying to do in more detail.&lt;br&gt;
&lt;br&gt;
Basically I have a binary image (attached) and I would like to plot a&lt;br&gt;
parabola across the min  y's for x=20:300 for example.&lt;br&gt;
&lt;br&gt;
But there are several values at y=1 in the binary image at x=200 for&lt;br&gt;
example.&lt;br&gt;
&lt;br&gt;
I did it point by point the following way but its not practical for&lt;br&gt;
200 points.&lt;br&gt;
&lt;br&gt;
x1=125;&lt;br&gt;
x2=120;&lt;br&gt;
x3=115;&lt;br&gt;
x4=110;&lt;br&gt;
x5=105;&lt;br&gt;
x6=100;&lt;br&gt;
x7=95;&lt;br&gt;
x8=80;&lt;br&gt;
x11=75;&lt;br&gt;
x12=70;&lt;br&gt;
x13=65;&lt;br&gt;
x14=60;&lt;br&gt;
x15=55;&lt;br&gt;
x16=40;&lt;br&gt;
x17=35;&lt;br&gt;
&lt;br&gt;
[y1]=find(I(:,x1));&lt;br&gt;
[y2]=find(I(:,x2));&lt;br&gt;
[y3]=find(I(:,x3));&lt;br&gt;
[y4]=find(l(:,x4));&lt;br&gt;
[y5]=find(I(:,x5));&lt;br&gt;
[y6]=find(Il(:,x6));&lt;br&gt;
[y7]=find(I(:,x7));&lt;br&gt;
[y8]=find(I(:,x8));&lt;br&gt;
[y11]=find(I(x11));&lt;br&gt;
[y12]=find(I(:,x12));&lt;br&gt;
[y13]=find(I(:,x13));&lt;br&gt;
[y14]=find(I(:,x14));&lt;br&gt;
[y15]=find(I(:,x15));&lt;br&gt;
[y16]=find(I(:,x16));&lt;br&gt;
[y17]=find(I(:,x17));&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
y1=min(y1);&lt;br&gt;
y2=min(y2);&lt;br&gt;
y3=min(y3);&lt;br&gt;
y4=min(y4);&lt;br&gt;
y5=min(y5);&lt;br&gt;
y6=min(y6);&lt;br&gt;
y7=min(y7);&lt;br&gt;
y8=min(y8);&lt;br&gt;
y11=min(y11);&lt;br&gt;
y12=min(y12);&lt;br&gt;
y13=min(y13);&lt;br&gt;
y14=min(y14);&lt;br&gt;
y15=min(y15);&lt;br&gt;
y16=min(y16);&lt;br&gt;
y17=min(y17);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Once I have the points I use p=polyfit(xcoord,ycoord,2) to draw the&lt;br&gt;
parabola which is pretty straightforward.The only problem I am facing&lt;br&gt;
is to get the corresponding minimum y coordinates for given larger&lt;br&gt;
range of x.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Best regards,</description>
    </item>
    <item>
      <pubDate>Sat, 04 Jul 2009 13:43:05 -0400</pubDate>
      <title>Re: Find corresponding y coordinates for given values of x in an </title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255285#662597</link>
      <author>ImageAnalyst</author>
      <description>I can't see the image.  Where did you post it?  There is nothing&lt;br&gt;
attached.&lt;br&gt;
&lt;br&gt;
Can you make x and y arrays?  Why did you pick certain sparse values?&lt;br&gt;
What happens at the &quot;in-between&quot; x values?</description>
    </item>
    <item>
      <pubDate>Sun, 05 Jul 2009 00:59:59 -0400</pubDate>
      <title>Re: Find corresponding y coordinates for given values of x in an </title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255285#662650</link>
      <author>Ashvin</author>
      <description>On Jul 4, 11:43&#160;pm, ImageAnalyst &amp;lt;imageanal...@mailinator.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; I can't see the image. &#160;Where did you post it? &#160;There is nothing&lt;br&gt;
&amp;gt; attached.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can you make x and y arrays? &#160;Why did you pick certain sparse values?&lt;br&gt;
&amp;gt; What happens at the &quot;in-between&quot; x values?&lt;br&gt;
&lt;br&gt;
Hi ImageAnalyst,&lt;br&gt;
&lt;br&gt;
I sent you an email with the image attached.&lt;br&gt;
&lt;br&gt;
Thanks,</description>
    </item>
  </channel>
</rss>

