<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: What&#8217;s in Your startup.m?</title>
	<atom:link href="http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32624</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 11 Nov 2011 15:09:03 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32624</guid>
		<description>Thanks for sharing your use, Tom.

--Loren</description>
		<content:encoded><![CDATA[<p>Thanks for sharing your use, Tom.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32623</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 11 Nov 2011 14:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32623</guid>
		<description>my startup.m contains:
&lt;pre&gt;
disp(&#039;Loading Previous Workspace...&#039;)
load matlab.mat;
&lt;/pre&gt;

I then have a corresponding finish.m:
&lt;pre&gt;
disp(&#039;Saving Current Workspace...&#039;)
save matlab.mat;
&lt;/pre&gt;

This way I have a persistent workspace and can always continue where I left off</description>
		<content:encoded><![CDATA[<p>my startup.m contains:</p>
<pre>
disp('Loading Previous Workspace...')
load matlab.mat;
</pre>
<p>I then have a corresponding finish.m:</p>
<pre>
disp('Saving Current Workspace...')
save matlab.mat;
</pre>
<p>This way I have a persistent workspace and can always continue where I left off</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32490</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 09 Sep 2011 11:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32490</guid>
		<description>Onur-

You should contact technical support and supply with with everything they need to run your script.  You can reach support via the link on the right of this blog.

--Loren</description>
		<content:encoded><![CDATA[<p>Onur-</p>
<p>You should contact technical support and supply with with everything they need to run your script.  You can reach support via the link on the right of this blog.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: onur</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32488</link>
		<dc:creator>onur</dc:creator>
		<pubDate>Thu, 08 Sep 2011 23:10:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-32488</guid>
		<description>When I execute a long script from startup.m, it crashes after a while. Why?

It seems like I can&#039;t call a script from startup and have it operational for a long time.</description>
		<content:encoded><![CDATA[<p>When I execute a long script from startup.m, it crashes after a while. Why?</p>
<p>It seems like I can&#8217;t call a script from startup and have it operational for a long time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andreimr</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-31699</link>
		<dc:creator>andreimr</dc:creator>
		<pubDate>Thu, 23 Sep 2010 18:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-31699</guid>
		<description>Thanks to your post, I now use &lt;pre&gt;startup.m&lt;/pre&gt; to set up my programming environment. I call EditorMacro.m (available off of mathworks.com&gt; to set up a number of keybindings to matlab scripts that I use as part of my programming workflow. I also CD to the directory of the project I&#039;m working on.</description>
		<content:encoded><![CDATA[<p>Thanks to your post, I now use
<pre>startup.m</pre>
</p><p> to set up my programming environment. I call EditorMacro.m (available off of mathworks.com&gt; to set up a number of keybindings to matlab scripts that I use as part of my programming workflow. I also CD to the directory of the project I&#8217;m working on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30778</link>
		<dc:creator>Les</dc:creator>
		<pubDate>Fri, 13 Nov 2009 05:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30778</guid>
		<description>One of the main things I use startup.m for is to turn on grid lines by default.  As another poster commented: why isn&#039;t this the default (or at least an option configurable without having to put these commands in the startup.m script)?

I also use it to set the MATLABROOT environment variable to correspond to the version of Matlab that has just been invoked.

I use this environment variable in Makefiles for S-function builds.  This allows using the same Makefile for use with multiple Matlab versions without manual editing of the Makefile.  

This requires the use of the setx utility from Microsoft&#039;s &quot;Windows XP Service Pack 2 Support Tools&quot; which allows setting system environment variables.  The support tools pack can be downloaded from:

http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38&amp;DisplayLang=en

Here is the operative portion of my startup.m:

&lt;pre&gt;
% Turn grid lines on by default
set(0, &#039;defaultAxesXGrid&#039;, &#039;on&#039;)
set(0, &#039;defaultAxesYGrid&#039;, &#039;on&#039;)
set(0, &#039;defaultAxesZGrid&#039;, &#039;on&#039;)

% Set the MATLABROOT environment variable if it is not set correctly or
% it does not exist
if (~isequal(getenv(&#039;MATLABROOT&#039;), matlabroot))
    fprintf(&#039;Updating MATLABROOT environment variable\n\n&#039;);
    result = dos([&#039;setx MATLABROOT &quot;&#039; matlabroot &#039;&quot;&#039;]);
    if (result ~= 0)
        fprintf([&#039;\nError setting MATLABROOT environment variable.  &#039;, ...
            &#039;You may not have the setx utility installed.\n&#039;...
            &#039;See the help below:\n\n&#039;]);
        help startup
    end        
end
clear result
&lt;/pre&gt;

-Les</description>
		<content:encoded><![CDATA[<p>One of the main things I use startup.m for is to turn on grid lines by default.  As another poster commented: why isn&#8217;t this the default (or at least an option configurable without having to put these commands in the startup.m script)?</p>
<p>I also use it to set the MATLABROOT environment variable to correspond to the version of Matlab that has just been invoked.</p>
<p>I use this environment variable in Makefiles for S-function builds.  This allows using the same Makefile for use with multiple Matlab versions without manual editing of the Makefile.  </p>
<p>This requires the use of the setx utility from Microsoft&#8217;s &#8220;Windows XP Service Pack 2 Support Tools&#8221; which allows setting system environment variables.  The support tools pack can be downloaded from:</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38&#038;DisplayLang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38&#038;DisplayLang=en</a></p>
<p>Here is the operative portion of my startup.m:</p>
<pre>
% Turn grid lines on by default
set(0, 'defaultAxesXGrid', 'on')
set(0, 'defaultAxesYGrid', 'on')
set(0, 'defaultAxesZGrid', 'on')

% Set the MATLABROOT environment variable if it is not set correctly or
% it does not exist
if (~isequal(getenv('MATLABROOT'), matlabroot))
    fprintf('Updating MATLABROOT environment variable\n\n');
    result = dos(['setx MATLABROOT "' matlabroot '"']);
    if (result ~= 0)
        fprintf(['\nError setting MATLABROOT environment variable.  ', ...
            'You may not have the setx utility installed.\n'...
            'See the help below:\n\n']);
        help startup
    end
end
clear result
</pre>
<p>-Les</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30775</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 12 Nov 2009 20:11:43 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30775</guid>
		<description>OysterEngineer-

The setting of defaults is documented in one place for all of graphics.  It&#039;s not specific to any of the graphics primitives, but appropriate for all of them.  I&#039;m guessing the thinking was that it would bloat the documentation to mention setting different defaults in each FRP.  But I will pass along your thoughts on this.   

O is indeed the root level.

Thanks for your thoughtful comments on the documentation.  Again, I will pass them along.

--Loren</description>
		<content:encoded><![CDATA[<p>OysterEngineer-</p>
<p>The setting of defaults is documented in one place for all of graphics.  It&#8217;s not specific to any of the graphics primitives, but appropriate for all of them.  I&#8217;m guessing the thinking was that it would bloat the documentation to mention setting different defaults in each FRP.  But I will pass along your thoughts on this.   </p>
<p>O is indeed the root level.</p>
<p>Thanks for your thoughtful comments on the documentation.  Again, I will pass them along.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OysterEngineer</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30773</link>
		<dc:creator>OysterEngineer</dc:creator>
		<pubDate>Thu, 12 Nov 2009 19:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30773</guid>
		<description>This post was really handy just because I learned how to default the grid on.

Here is my question: Why isn&#039;t this capability default setting capability mentioned in the FRP for grid?  Instead, it is buried 3 layers deep in the general discussion of Graphics.

Also, what does it mean when the 1st example sets a default for the gcf, while a few lines later is says, &quot;It is meaningful to specify a default figure color only on the root level.&quot;?  In your example, I guess you are setting grid to on at the root level, assuming that a handle value of 0 is the same as the root level.

Once I found the appropriate page of documentation, I did a search for &quot;Defining Default Values,&quot; and the 1st search result that was returned was under the broad topic of Object-Oriented Programming.  This documentation miss-directed me in that the style for setting default values in the world of OOP is different than the world of Handle Graphics.

Let me turn this around a bit: List the series of documentation that I needed to read so I could have learned all I needed to know to generate your above command just from reading the documentation.

By the way, this encounter with the non-FRP documentation took me to the nice hot-link populated tree discussing Handle Graphic Object Properties.  This section of documentation illustrates very strongly the shortcoming &amp; complexity of MatLab&#039;s graphic process.</description>
		<content:encoded><![CDATA[<p>This post was really handy just because I learned how to default the grid on.</p>
<p>Here is my question: Why isn&#8217;t this capability default setting capability mentioned in the FRP for grid?  Instead, it is buried 3 layers deep in the general discussion of Graphics.</p>
<p>Also, what does it mean when the 1st example sets a default for the gcf, while a few lines later is says, &#8220;It is meaningful to specify a default figure color only on the root level.&#8221;?  In your example, I guess you are setting grid to on at the root level, assuming that a handle value of 0 is the same as the root level.</p>
<p>Once I found the appropriate page of documentation, I did a search for &#8220;Defining Default Values,&#8221; and the 1st search result that was returned was under the broad topic of Object-Oriented Programming.  This documentation miss-directed me in that the style for setting default values in the world of OOP is different than the world of Handle Graphics.</p>
<p>Let me turn this around a bit: List the series of documentation that I needed to read so I could have learned all I needed to know to generate your above command just from reading the documentation.</p>
<p>By the way, this encounter with the non-FRP documentation took me to the nice hot-link populated tree discussing Handle Graphic Object Properties.  This section of documentation illustrates very strongly the shortcoming &amp; complexity of MatLab&#8217;s graphic process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oscar</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30612</link>
		<dc:creator>Oscar</dc:creator>
		<pubDate>Tue, 15 Sep 2009 17:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30612</guid>
		<description>Thanks Daniel, that is so cool, have been wondering why the mathworks guys have never added an option to do that.</description>
		<content:encoded><![CDATA[<p>Thanks Daniel, that is so cool, have been wondering why the mathworks guys have never added an option to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anne</title>
		<link>http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30544</link>
		<dc:creator>Anne</dc:creator>
		<pubDate>Thu, 20 Aug 2009 17:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/03/03/whats-in-your-startupm/#comment-30544</guid>
		<description>Thank you everyone for the code to save and reload the editor state. I&#039;ve been looking for a way to do this. It is very helpful.</description>
		<content:encoded><![CDATA[<p>Thank you everyone for the code to save and reload the editor state. I&#8217;ve been looking for a way to do this. It is very helpful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

