<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732</link>
    <title>MATLAB Central Newsreader - Running a function in the background</title>
    <description>Feed for thread: Running a function in the background</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>Sun, 27 Sep 2009 04:15:13 -0400</pubDate>
      <title>Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#682898</link>
      <author>swgillan</author>
      <description>I was recently reviewing a webinar on large datasets, and the person&lt;br&gt;
running the webinar ran a function called WriteMalloc (or something&lt;br&gt;
like that).&lt;br&gt;
&lt;br&gt;
Essentially what it did was it was a plot window that updated every&lt;br&gt;
second with the amount of memory used by the matlab session.&lt;br&gt;
&lt;br&gt;
I am looking at writing something similar, but I have never seen a&lt;br&gt;
figure get updated and run parallel with inputting in the command&lt;br&gt;
window. Does anyone know how this might be done?&lt;br&gt;
&lt;br&gt;
This isn't vital, but it was one of those things that I have never&lt;br&gt;
seen before, and think it could be really handy.</description>
    </item>
    <item>
      <pubDate>Mon, 28 Sep 2009 14:16:43 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683111</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;swgillan&quot; &amp;lt;swgillan@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:f48e68c5-54f4-41b8-9843-0d8c995366b0@i4g2000prm.googlegroups.com...&lt;br&gt;
&amp;gt;I was recently reviewing a webinar on large datasets, and the person&lt;br&gt;
&amp;gt; running the webinar ran a function called WriteMalloc (or something&lt;br&gt;
&amp;gt; like that).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Essentially what it did was it was a plot window that updated every&lt;br&gt;
&amp;gt; second with the amount of memory used by the matlab session.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am looking at writing something similar, but I have never seen a&lt;br&gt;
&amp;gt; figure get updated and run parallel with inputting in the command&lt;br&gt;
&amp;gt; window. Does anyone know how this might be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; This isn't vital, but it was one of those things that I have never&lt;br&gt;
&amp;gt; seen before, and think it could be really handy.&lt;br&gt;
&lt;br&gt;
I don't know specifically what was being used in the webinar you described, &lt;br&gt;
but perhaps that function was using a TIMER object to perform the updates, &lt;br&gt;
or it set the *DataSource properties of a line and used REFRESHDATA to force &lt;br&gt;
it to update?&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Mon, 28 Sep 2009 19:01:07 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683192</link>
      <author>TideMan</author>
      <description>On Sep 27, 5:15&#160;pm, swgillan &amp;lt;swgil...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; I was recently reviewing a webinar on large datasets, and the person&lt;br&gt;
&amp;gt; running the webinar ran a function called WriteMalloc (or something&lt;br&gt;
&amp;gt; like that).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Essentially what it did was it was a plot window that updated every&lt;br&gt;
&amp;gt; second with the amount of memory used by the matlab session.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am looking at writing something similar, but I have never seen a&lt;br&gt;
&amp;gt; figure get updated and run parallel with inputting in the command&lt;br&gt;
&amp;gt; window. Does anyone know how this might be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; This isn't vital, but it was one of those things that I have never&lt;br&gt;
&amp;gt; seen before, and think it could be really handy.&lt;br&gt;
&lt;br&gt;
If you're using Linux, Conky can do this for you.&lt;br&gt;
&lt;a href=&quot;http://conky.sourceforge.net/&quot;&gt;http://conky.sourceforge.net/&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 30 Sep 2009 07:09:39 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683595</link>
      <author>swgillan</author>
      <description>I wasn't quite sure exactly what they did (the flashed the code, and&lt;br&gt;
that was it).&lt;br&gt;
&lt;br&gt;
Essentially, they had a figure window docked and at the same time in&lt;br&gt;
the command window they were doing basic matrix operations showing how&lt;br&gt;
the memory is managed in matlab (hence the updated docked figure&lt;br&gt;
showing the line graph of system.memory, or something like that as&lt;br&gt;
time elapsed).&lt;br&gt;
&lt;br&gt;
Basically, that is how they were using it, and I was curious about&lt;br&gt;
looking at the code (it wasn't posted).&lt;br&gt;
&lt;br&gt;
I can try and view the topic for anyway else to have a look at it. I&lt;br&gt;
have seen this demo twice before, once in person here at UVIC and&lt;br&gt;
again online.&lt;br&gt;
&lt;br&gt;
Steven Gillan&lt;br&gt;
&lt;br&gt;
On Sep 28, 7:16&#160;am, &quot;Steven Lord&quot; &amp;lt;sl...@mathworks.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &quot;swgillan&quot; &amp;lt;swgil...@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; news:f48e68c5-54f4-41b8-9843-0d8c995366b0@i4g2000prm.googlegroups.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;I was recently reviewing a webinar on large datasets, and the person&lt;br&gt;
&amp;gt; &amp;gt; running the webinar ran a function called WriteMalloc (or something&lt;br&gt;
&amp;gt; &amp;gt; like that).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Essentially what it did was it was a plot window that updated every&lt;br&gt;
&amp;gt; &amp;gt; second with the amount of memory used by the matlab session.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I am looking at writing something similar, but I have never seen a&lt;br&gt;
&amp;gt; &amp;gt; figure get updated and run parallel with inputting in the command&lt;br&gt;
&amp;gt; &amp;gt; window. Does anyone know how this might be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; This isn't vital, but it was one of those things that I have never&lt;br&gt;
&amp;gt; &amp;gt; seen before, and think it could be really handy.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I don't know specifically what was being used in the webinar you described,&lt;br&gt;
&amp;gt; but perhaps that function was using a TIMER object to perform the updates,&lt;br&gt;
&amp;gt; or it set the *DataSource properties of a line and used REFRESHDATA to force&lt;br&gt;
&amp;gt; it to update?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt; comp.soft-sys.matlab (CSSM) FAQ:&lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 30 Sep 2009 07:10:27 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683597</link>
      <author>swgillan</author>
      <description>On Sep 28, 12:01&#160;pm, TideMan &amp;lt;mul...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; On Sep 27, 5:15&#160;pm,swgillan&amp;lt;swgil...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I was recently reviewing a webinar on large datasets, and the person&lt;br&gt;
&amp;gt; &amp;gt; running the webinar ran a function called WriteMalloc (or something&lt;br&gt;
&amp;gt; &amp;gt; like that).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Essentially what it did was it was a plot window that updated every&lt;br&gt;
&amp;gt; &amp;gt; second with the amount of memory used by the matlab session.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I am looking at writing something similar, but I have never seen a&lt;br&gt;
&amp;gt; &amp;gt; figure get updated and run parallel with inputting in the command&lt;br&gt;
&amp;gt; &amp;gt; window. Does anyone know how this might be done?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; This isn't vital, but it was one of those things that I have never&lt;br&gt;
&amp;gt; &amp;gt; seen before, and think it could be really handy.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If you're using Linux, Conky can do this for you.&lt;a href=&quot;http://conky.sourceforge.net/&quot;&gt;http://conky.sourceforge.net/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I am not looking at the specific Malloc and memory case, but more&lt;br&gt;
having the figure updating in the background, while I work in the&lt;br&gt;
command window.</description>
    </item>
    <item>
      <pubDate>Wed, 30 Sep 2009 07:39:09 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683603</link>
      <author>swgillan</author>
      <description>I found the webinar in question: Large Data Sets in Matlab, presented&lt;br&gt;
by Mike Agostini.&lt;br&gt;
&lt;br&gt;
I have since emailed him directly finding out what I wanted. If you&lt;br&gt;
are curious, it was at the 20:00 mark that I was interested in.</description>
    </item>
    <item>
      <pubDate>Wed, 30 Sep 2009 14:04:09 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683702</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;swgillan&quot; &amp;lt;swgillan@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:105ea682-707d-4779-b613-cd1c8bb7cfe0@e4g2000prn.googlegroups.com...&lt;br&gt;
&amp;gt;I found the webinar in question: Large Data Sets in Matlab, presented&lt;br&gt;
&amp;gt; by Mike Agostini.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have since emailed him directly finding out what I wanted. If you&lt;br&gt;
&amp;gt; are curious, it was at the 20:00 mark that I was interested in.&lt;br&gt;
&lt;br&gt;
If I were implementing something like that, I'd use a Timer object to &lt;br&gt;
periodically run a function that updates the figure.  As a small example:&lt;br&gt;
&lt;br&gt;
function comet2(delayS, x, y)&lt;br&gt;
% COMET2 Display points in a line with a delay between each point display&lt;br&gt;
%&lt;br&gt;
% COMET2(delayS, x, y) displays each of the points represented by elements&lt;br&gt;
% in the x and y vectors with a delay of delayS seconds between each point.&lt;br&gt;
&lt;br&gt;
if ~isequal(numel(x), numel(y))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error('comet2:invalidCoords', 'The x and y inputs must have the same &lt;br&gt;
number of elements.');&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
if ~isreal(delayS) || delayS &amp;lt;= 0 || ~isscalar(delayS) || ~isfinite(delayS)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error('comet2:invalidDelayS', 'The delay must be a real finite positive &lt;br&gt;
scalar.');&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
h = line(NaN, NaN);&lt;br&gt;
axis([min(x) max(x) min(y) max(y)])&lt;br&gt;
set(h, 'UserData', 1);&lt;br&gt;
&lt;br&gt;
t = timer('TasksToExecute', numel(x), ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'ExecutionMode', 'fixedRate', ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'StartDelay', 0, ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Period', delayS);&lt;br&gt;
set(t, 'TimerFcn', @(varargin) updatePlot(h, x, y, t), ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'StopFcn', @(varargin) delete(t));&lt;br&gt;
start(t);&lt;br&gt;
&lt;br&gt;
function updatePlot(h, x, y, t)&lt;br&gt;
try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nextPoint = get(h, 'UserData');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set(h, 'XData', x(1:nextPoint), 'YData', y(1:nextPoint), 'UserData', &lt;br&gt;
nextPoint+1);&lt;br&gt;
catch %#ok&amp;lt;CTCH&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stop(t);&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Thu, 01 Oct 2009 02:52:47 -0400</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#683839</link>
      <author>swgillan</author>
      <description>Thanks for sharing that, I have never used a lot of the gcf stuff, so&lt;br&gt;
I will look over that code and take what I can from it. I was also&lt;br&gt;
passed on the watch_malloc code from the presenter, so I should be&lt;br&gt;
able to figure out how things were done!&lt;br&gt;
&lt;br&gt;
Thanks for all the help.&lt;br&gt;
&lt;br&gt;
Now all I need is to find out why 3d plotting is messed up in Ubuntu&lt;br&gt;
9.04 (I think it is an intel graphics driver problem).&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
&lt;br&gt;
Steven Gillan&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If I were implementing something like that, I'd use a Timer object to&lt;br&gt;
&amp;gt; periodically run a function that updates the figure. &#160;As a small example:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; function comet2(delayS, x, y)&lt;br&gt;
&amp;gt; % COMET2 Display points in a line with a delay between each point display&lt;br&gt;
&amp;gt; %&lt;br&gt;
&amp;gt; % COMET2(delayS, x, y) displays each of the points represented by elements&lt;br&gt;
&amp;gt; % in the x and y vectors with a delay of delayS seconds between each point.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; if ~isequal(numel(x), numel(y))&lt;br&gt;
&amp;gt; &#160; &#160; error('comet2:invalidCoords', 'The x and y inputs must have the same&lt;br&gt;
&amp;gt; number of elements.');&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; if ~isreal(delayS) || delayS &amp;lt;= 0 || ~isscalar(delayS) || ~isfinite(delayS)&lt;br&gt;
&amp;gt; &#160; &#160; error('comet2:invalidDelayS', 'The delay must be a real finite positive&lt;br&gt;
&amp;gt; scalar.');&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; h = line(NaN, NaN);&lt;br&gt;
&amp;gt; axis([min(x) max(x) min(y) max(y)])&lt;br&gt;
&amp;gt; set(h, 'UserData', 1);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; t = timer('TasksToExecute', numel(x), ...&lt;br&gt;
&amp;gt; &#160; &#160; 'ExecutionMode', 'fixedRate', ...&lt;br&gt;
&amp;gt; &#160; &#160; 'StartDelay', 0, ...&lt;br&gt;
&amp;gt; &#160; &#160; 'Period', delayS);&lt;br&gt;
&amp;gt; set(t, 'TimerFcn', @(varargin) updatePlot(h, x, y, t), ...&lt;br&gt;
&amp;gt; &#160; &#160; 'StopFcn', @(varargin) delete(t));&lt;br&gt;
&amp;gt; start(t);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; function updatePlot(h, x, y, t)&lt;br&gt;
&amp;gt; try&lt;br&gt;
&amp;gt; &#160; &#160; nextPoint = get(h, 'UserData');&lt;br&gt;
&amp;gt; &#160; &#160; set(h, 'XData', x(1:nextPoint), 'YData', y(1:nextPoint), 'UserData',&lt;br&gt;
&amp;gt; nextPoint+1);&lt;br&gt;
&amp;gt; catch %#ok&amp;lt;CTCH&amp;gt;&lt;br&gt;
&amp;gt; &#160; &#160; stop(t);&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt; comp.soft-sys.matlab (CSSM) FAQ:&lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 17 Nov 2009 09:28:01 -0500</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#695366</link>
      <author>Simon</author>
      <description>swgillan &amp;lt;swgillan@gmail.com&amp;gt; wrote in message &amp;lt;43fc2ee2-059a-4a4f-8455-1adf0388a02d@w37g2000prg.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Thanks for sharing that, I have never used a lot of the gcf stuff, so&lt;br&gt;
&amp;gt; I will look over that code and take what I can from it. I was also&lt;br&gt;
&amp;gt; passed on the watch_malloc code from the presenter, so I should be&lt;br&gt;
&amp;gt; able to figure out how things were done!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for all the help.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Now all I need is to find out why 3d plotting is messed up in Ubuntu&lt;br&gt;
&amp;gt; 9.04 (I think it is an intel graphics driver problem).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Steven Gillan&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; If I were implementing something like that, I'd use a Timer object to&lt;br&gt;
&amp;gt; &amp;gt; periodically run a function that updates the figure. ?As a small example:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; function comet2(delayS, x, y)&lt;br&gt;
&amp;gt; &amp;gt; % COMET2 Display points in a line with a delay between each point display&lt;br&gt;
&amp;gt; &amp;gt; %&lt;br&gt;
&amp;gt; &amp;gt; % COMET2(delayS, x, y) displays each of the points represented by elements&lt;br&gt;
&amp;gt; &amp;gt; % in the x and y vectors with a delay of delayS seconds between each point.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; if ~isequal(numel(x), numel(y))&lt;br&gt;
&amp;gt; &amp;gt; ? ? error('comet2:invalidCoords', 'The x and y inputs must have the same&lt;br&gt;
&amp;gt; &amp;gt; number of elements.');&lt;br&gt;
&amp;gt; &amp;gt; end&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; if ~isreal(delayS) || delayS &amp;lt;= 0 || ~isscalar(delayS) || ~isfinite(delayS)&lt;br&gt;
&amp;gt; &amp;gt; ? ? error('comet2:invalidDelayS', 'The delay must be a real finite positive&lt;br&gt;
&amp;gt; &amp;gt; scalar.');&lt;br&gt;
&amp;gt; &amp;gt; end&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; h = line(NaN, NaN);&lt;br&gt;
&amp;gt; &amp;gt; axis([min(x) max(x) min(y) max(y)])&lt;br&gt;
&amp;gt; &amp;gt; set(h, 'UserData', 1);&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; t = timer('TasksToExecute', numel(x), ...&lt;br&gt;
&amp;gt; &amp;gt; ? ? 'ExecutionMode', 'fixedRate', ...&lt;br&gt;
&amp;gt; &amp;gt; ? ? 'StartDelay', 0, ...&lt;br&gt;
&amp;gt; &amp;gt; ? ? 'Period', delayS);&lt;br&gt;
&amp;gt; &amp;gt; set(t, 'TimerFcn', @(varargin) updatePlot(h, x, y, t), ...&lt;br&gt;
&amp;gt; &amp;gt; ? ? 'StopFcn', @(varargin) delete(t));&lt;br&gt;
&amp;gt; &amp;gt; start(t);&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; function updatePlot(h, x, y, t)&lt;br&gt;
&amp;gt; &amp;gt; try&lt;br&gt;
&amp;gt; &amp;gt; ? ? nextPoint = get(h, 'UserData');&lt;br&gt;
&amp;gt; &amp;gt; ? ? set(h, 'XData', x(1:nextPoint), 'YData', y(1:nextPoint), 'UserData',&lt;br&gt;
&amp;gt; &amp;gt; nextPoint+1);&lt;br&gt;
&amp;gt; &amp;gt; catch %#ok&amp;lt;CTCH&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; ? ? stop(t);&lt;br&gt;
&amp;gt; &amp;gt; end&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt; Steve Lord&lt;br&gt;
&amp;gt; &amp;gt; sl...@mathworks.com&lt;br&gt;
&amp;gt; &amp;gt; comp.soft-sys.matlab (CSSM) FAQ:&lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Hi&lt;br&gt;
&lt;br&gt;
Could you please share what you have found so far? I am also trying to call some function via timer functions and in the background, but my GUI keeps getting locked for the time the m-file is running.&lt;br&gt;
&lt;br&gt;
Best regards</description>
    </item>
    <item>
      <pubDate>Wed, 03 Mar 2010 09:00:22 -0500</pubDate>
      <title>Re: Running a function in the background</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261732#722914</link>
      <author>Peder Schmedling</author>
      <description>swgillan &amp;lt;swgillan@gmail.com&amp;gt; wrote in message &amp;lt;43fc2ee2-059a-4a4f-8455-1adf0388a02d@w37g2000prg.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Thanks for sharing that, I have never used a lot of the gcf stuff, so&lt;br&gt;
&amp;gt; I will look over that code and take what I can from it. I was also&lt;br&gt;
&amp;gt; passed on the watch_malloc code from the presenter, so I should be&lt;br&gt;
&amp;gt; able to figure out how things were done!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for all the help.&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
For those of you who also goes searching for the watchMalloc.m source code (like me), you'll be pleased to know that Michael Agostini (the presenter of Large Datasets in MATLAB) has uploaded it to file exchange:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/25579-watch-memory-allocation&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/25579-watch-memory-allocation&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
The webinar in question:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/company/events/webinars/wbnr33692.html&quot;&gt;http://www.mathworks.com/company/events/webinars/wbnr33692.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
best regards&lt;br&gt;
Peder Schmedling</description>
    </item>
  </channel>
</rss>

