<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: A Link to the Data</title>
	<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/</link>
	<description>Inside the MATLAB Desktop is written by the MATLAB Interface teams.&#60;br /&#62;&#60;br /&#62;&#60;a href="http://blogs.mathworks.com/images/desktop/authors/team_small.jpg"&#62;&#60;img src="http://blogs.mathworks.com/images/desktop/authors/team_tiny.jpg"&#62;&#60;/a&#62;</description>
	<pubDate>Fri, 29 Aug 2008 02:55:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: James Owen</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4629</link>
		<dc:creator>James Owen</dc:creator>
		<pubDate>Mon, 19 May 2008 12:39:28 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4629</guid>
		<description>For Chee’s example, I’m not sure exactly why “x_remain” has not changed, but I would recommend removing the call to “linkdata on” from the deleteData function. It creates a dynamic link between the graphics and the variables “x”,”y” in the current workspace. When execution passes from the deleteData functional workspace back to the base workspace, those variables may no longer exist or may have changed, potentially causing the plot to update to reflect the changes.

For Greg’s point about linkdata for images, we agree that this would be good to do, and it definitely adds weight to the idea to hear customers ask for it specifically.</description>
		<content:encoded><![CDATA[<p>For Chee’s example, I’m not sure exactly why “x_remain” has not changed, but I would recommend removing the call to “linkdata on” from the deleteData function. It creates a dynamic link between the graphics and the variables “x”,”y” in the current workspace. When execution passes from the deleteData functional workspace back to the base workspace, those variables may no longer exist or may have changed, potentially causing the plot to update to reflect the changes.</p>
<p>For Greg’s point about linkdata for images, we agree that this would be good to do, and it definitely adds weight to the idea to hear customers ask for it specifically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Johnson</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4586</link>
		<dc:creator>Greg Johnson</dc:creator>
		<pubDate>Fri, 16 May 2008 13:47:28 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4586</guid>
		<description>It doesn't seem possible to do linkdata for images - which is a great shame!  Is this in the pipeline?</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t seem possible to do linkdata for images - which is a great shame!  Is this in the pipeline?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4345</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 30 Apr 2008 15:19:50 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4345</guid>
		<description>Chee,

 I am not able to help you further debug in this way. If you have maintenance on your license, you can contact tech support and perhaps someone there can walk through it with you. http://www.mathworks.com/support/service_requests/contact_support.do</description>
		<content:encoded><![CDATA[<p>Chee,</p>
<p> I am not able to help you further debug in this way. If you have maintenance on your license, you can contact tech support and perhaps someone there can walk through it with you. <a href="http://www.mathworks.com/support/service_requests/contact_support.do" rel="nofollow">http://www.mathworks.com/support/service_requests/contact_support.do</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chee</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4323</link>
		<dc:creator>chee</dc:creator>
		<pubDate>Mon, 28 Apr 2008 21:50:43 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4323</guid>
		<description>Hi Mike,

I run the same code. x_remain is the same as origX although y_remain is different from origY.

Not sure what is wrong...

Thanks.

Sincerely,
Chee</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I run the same code. x_remain is the same as origX although y_remain is different from origY.</p>
<p>Not sure what is wrong&#8230;</p>
<p>Thanks.</p>
<p>Sincerely,<br />
Chee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4311</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 28 Apr 2008 13:09:53 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4311</guid>
		<description>If I run your code:
&lt;pre&gt;
h = deleteData();
origX=get(h,'XData')
origY = get(h,'YData')
&lt;/pre&gt;
Remove some points with the data brush tool, and then follow up with:
&lt;pre&gt;
x_reamin=get(h,'Xdata')
y_remain = get(h,'YData');
whos
&lt;/pre&gt;
You can see that the x_remain vector is smaller than the xOrig vector.</description>
		<content:encoded><![CDATA[<p>If I run your code:</p>
<pre>
h = deleteData();
origX=get(h,'XData')
origY = get(h,'YData')
</pre>
<p>Remove some points with the data brush tool, and then follow up with:</p>
<pre>
x_reamin=get(h,'Xdata')
y_remain = get(h,'YData');
whos
</pre>
<p>You can see that the x_remain vector is smaller than the xOrig vector.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chee</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4297</link>
		<dc:creator>chee</dc:creator>
		<pubDate>Sun, 27 Apr 2008 19:47:48 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4297</guid>
		<description>Hi Mike,

I still have questions in accessing the brushed data in a function.

The function I write is like this

function h = deleteData()
x = 1:100; y = 1:100;
h = plot(x,y,'.','XDataSource','x','YDataSource','y');
linkdata on;
brush on

Then, I call this function 
h = deleteData();
and interactively delete some points, now, I want to access the points left in the figure,
x_remain = get(h,'XData');
y_remain = get(h,'YData');

x_remain and y_remain are still the same as the original x and y. 

Is there a way to access the points that remain in the figure? Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I still have questions in accessing the brushed data in a function.</p>
<p>The function I write is like this</p>
<p>function h = deleteData()<br />
x = 1:100; y = 1:100;<br />
h = plot(x,y,&#8217;.',&#8217;XDataSource&#8217;,'x&#8217;,'YDataSource&#8217;,'y&#8217;);<br />
linkdata on;<br />
brush on</p>
<p>Then, I call this function<br />
h = deleteData();<br />
and interactively delete some points, now, I want to access the points left in the figure,<br />
x_remain = get(h,&#8217;XData&#8217;);<br />
y_remain = get(h,&#8217;YData&#8217;);</p>
<p>x_remain and y_remain are still the same as the original x and y. </p>
<p>Is there a way to access the points that remain in the figure? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chee</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4291</link>
		<dc:creator>chee</dc:creator>
		<pubDate>Sun, 27 Apr 2008 10:29:52 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4291</guid>
		<description>Thanks, Mike. I found that the deleted values are actually filled with NaNs. The variable size didn't change, so I mistakenly thought the variables didn't change.</description>
		<content:encoded><![CDATA[<p>Thanks, Mike. I found that the deleted values are actually filled with NaNs. The variable size didn&#8217;t change, so I mistakenly thought the variables didn&#8217;t change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4273</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 25 Apr 2008 20:20:51 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4273</guid>
		<description>Chee,

 I am not sure what is you are ultimately looking for. If you brush a linked plot, the changes are reflected in the originating workspace variables. If you want to know what changed, you can retain an original (non-linked) copy of that data and use set functions to find the indices that changed.</description>
		<content:encoded><![CDATA[<p>Chee,</p>
<p> I am not sure what is you are ultimately looking for. If you brush a linked plot, the changes are reflected in the originating workspace variables. If you want to know what changed, you can retain an original (non-linked) copy of that data and use set functions to find the indices that changed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chee</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4272</link>
		<dc:creator>chee</dc:creator>
		<pubDate>Fri, 25 Apr 2008 18:48:18 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4272</guid>
		<description>Hi Mike,

I am trying to write a program to let users to select points from a figure (say, I have 100 points with x and y variables) using the new data brushing function, then when the user delete the brushed points, these points will also be deleted from the original variables x, y. 

So my question is: is it possible to return the indices of the brushed data so that I can update x and y when the points are deleted? When using linkdata and databrush, I can clearly see that the selected points are highlighted in variable editor window, so it seems possible to do that. However, neither linkdata and databrush does not provide an output variable to store the indices of the brushed variable. Is there a way to get around this? Thanks.

chee</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I am trying to write a program to let users to select points from a figure (say, I have 100 points with x and y variables) using the new data brushing function, then when the user delete the brushed points, these points will also be deleted from the original variables x, y. </p>
<p>So my question is: is it possible to return the indices of the brushed data so that I can update x and y when the points are deleted? When using linkdata and databrush, I can clearly see that the selected points are highlighted in variable editor window, so it seems possible to do that. However, neither linkdata and databrush does not provide an output variable to store the indices of the brushed variable. Is there a way to get around this? Thanks.</p>
<p>chee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4149</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 17 Apr 2008 12:31:38 +0000</pubDate>
		<guid>http://blogs.mathworks.com/desktop/2008/04/14/a-link-to-the-data/#comment-4149</guid>
		<description>Tim,
 
 Unfortunately I don't have a version of that code that meets my standards for sharing, however the basic idea is this:

Set the bytes available callback of the serial object to a sub-function which contains code such as:
&lt;pre&gt;
x_vector(end+1) = x_vector(end)+1;
y_vector(end+1) = fread(s,1); %read in data
set(plot_line_handle,'Xdata',x_vector,'Ydata',y_vector);
&lt;/pre&gt;
In this case I'm just updating the line object and not the whole plot. The first time through I create a new plot with:
&lt;pre&gt;
plot_line_handle = plot(0,y_0);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Tim,</p>
<p> Unfortunately I don&#8217;t have a version of that code that meets my standards for sharing, however the basic idea is this:</p>
<p>Set the bytes available callback of the serial object to a sub-function which contains code such as:</p>
<pre>
x_vector(end+1) = x_vector(end)+1;
y_vector(end+1) = fread(s,1); %read in data
set(plot_line_handle,'Xdata',x_vector,'Ydata',y_vector);
</pre>
<p>In this case I&#8217;m just updating the line object and not the whole plot. The first time through I create a new plot with:</p>
<pre>
plot_line_handle = plot(0,y_0);
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
