<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168880</link>
    <title>MATLAB Central Newsreader - Spline through non uniformly spaced points</title>
    <description>Feed for thread: Spline through non uniformly spaced points</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>Wed, 07 May 2008 18:05:09 -0400</pubDate>
      <title>Spline through non uniformly spaced points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168880#430871</link>
      <author>David Doria</author>
      <description>I want to do something like this:&lt;br&gt;
&lt;br&gt;
a=axes;&lt;br&gt;
set(a,'xlim',[-2 2]);&lt;br&gt;
set(a,'ylim',[-2 2]);&lt;br&gt;
[x y] = ginput;&lt;br&gt;
&lt;br&gt;
%click a bunch of points&lt;br&gt;
&lt;br&gt;
%draw a spline through the points&lt;br&gt;
xx=-2:.01:2;&lt;br&gt;
yy=spline(x, y, xx);&lt;br&gt;
&lt;br&gt;
the problem seems to be that the points I have clicked are&lt;br&gt;
not uniformly spaced (clearly) so i get the following:&lt;br&gt;
&quot;The data sites should be distinct.&quot;&lt;br&gt;
&lt;br&gt;
I've used meshgrid before, but it seems to be more for&lt;br&gt;
plotting 3d functions.. i'm not sure how to &quot;snap&quot; these&lt;br&gt;
coordinates to a grid without giving them some kind of &quot;z&quot;&lt;br&gt;
value.&lt;br&gt;
&lt;br&gt;
Any suggestions?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Wed, 07 May 2008 18:13:41 -0400</pubDate>
      <title>Re: Spline through non uniformly spaced points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168880#430873</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fvsr0k$n1h$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
David Doria &amp;lt;daviddoria@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;I want to do something like this:&lt;br&gt;
&lt;br&gt;
&amp;gt;a=axes;&lt;br&gt;
&amp;gt;set(a,'xlim',[-2 2]);&lt;br&gt;
&amp;gt;set(a,'ylim',[-2 2]);&lt;br&gt;
&amp;gt;[x y] = ginput;&lt;br&gt;
&lt;br&gt;
&amp;gt;%click a bunch of points&lt;br&gt;
&lt;br&gt;
&amp;gt;%draw a spline through the points&lt;br&gt;
&amp;gt;xx=-2:.01:2;&lt;br&gt;
&amp;gt;yy=spline(x, y, xx);&lt;br&gt;
&lt;br&gt;
&amp;gt;the problem seems to be that the points I have clicked are&lt;br&gt;
&amp;gt;not uniformly spaced (clearly) so i get the following:&lt;br&gt;
&amp;gt;&quot;The data sites should be distinct.&quot;&lt;br&gt;
&lt;br&gt;
Not having the points uniformly spaced does not cause that problem.&lt;br&gt;
What -would- cause that problem is clicking the same location twice,&lt;br&gt;
such as if you were to close a curve. The message is telling you&lt;br&gt;
that all of the point pairs must be unique.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;And that's the way it is.&quot;                 -- Walter Cronkite</description>
    </item>
    <item>
      <pubDate>Wed, 07 May 2008 18:45:06 -0400</pubDate>
      <title>Re: Spline through non uniformly spaced points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/168880#430880</link>
      <author>David Doria</author>
      <description>ah ok , great - I don't think I had clicked exactly in the&lt;br&gt;
same point, I think two points just had the same X&lt;br&gt;
coordinate - is this indeed the reason for that error?</description>
    </item>
  </channel>
</rss>

