<?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: Machine-Independent Filenames</title>
	<atom:link href="http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/</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>Fri, 17 Feb 2012 13:41:33 +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/2007/04/13/machine-independent-filenames/#comment-31005</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Mon, 25 Jan 2010 12:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-31005</guid>
		<description>Andrey-

It works for me:

&lt;pre class=&quot;code&quot;&gt;
&gt;&gt; dir \\mathworks\public\Loren_Shure

.                                      xxx
.. 
&lt;/pre&gt;

--Loren</description>
		<content:encoded><![CDATA[<p>Andrey-</p>
<p>It works for me:</p>
<pre class="code">
>> dir \\mathworks\public\Loren_Shure

.                                      xxx
..
</pre>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrey</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-31004</link>
		<dc:creator>Andrey</dc:creator>
		<pubDate>Sun, 24 Jan 2010 18:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-31004</guid>
		<description>Hi Loren!
Is there a way to list a network directory by using UNC pathnames?
When I use 
&lt;pre&gt;
dir(&#039;\\myNet\myDir&#039;)
&lt;/pre&gt;
it does not work.</description>
		<content:encoded><![CDATA[<p>Hi Loren!<br />
Is there a way to list a network directory by using UNC pathnames?<br />
When I use </p>
<pre>
dir('\\myNet\myDir')
</pre>
<p>it does not work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23991</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 28 Dec 2007 15:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23991</guid>
		<description>Arsen-

I gave you my recommendations above.  It depends on what the path is on the other operating system.  Split the path up so you use filesep, pathsep, etc.

--Loren</description>
		<content:encoded><![CDATA[<p>Arsen-</p>
<p>I gave you my recommendations above.  It depends on what the path is on the other operating system.  Split the path up so you use filesep, pathsep, etc.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arsen</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23979</link>
		<dc:creator>Arsen</dc:creator>
		<pubDate>Fri, 28 Dec 2007 06:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23979</guid>
		<description>Thank you, Loren!!
How would you approach making matlabpath portable between Linux and Windows? I.e. if I have c&quot;:\myprogs\ver1\my_code&quot; in the matlabpath.</description>
		<content:encoded><![CDATA[<p>Thank you, Loren!!<br />
How would you approach making matlabpath portable between Linux and Windows? I.e. if I have c&#8221;:\myprogs\ver1\my_code&#8221; in the matlabpath.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23720</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Sat, 22 Dec 2007 21:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23720</guid>
		<description>Arsen-

You should recode them to use pathsep, etc. and not be so tightly bound to absolute paths.  Some of your functions, if you have them, might take pieces of their paths as part of the input arguments, should that make sense.

--loren</description>
		<content:encoded><![CDATA[<p>Arsen-</p>
<p>You should recode them to use pathsep, etc. and not be so tightly bound to absolute paths.  Some of your functions, if you have them, might take pieces of their paths as part of the input arguments, should that make sense.</p>
<p>&#8211;loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arsen</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23717</link>
		<dc:creator>Arsen</dc:creator>
		<pubDate>Sat, 22 Dec 2007 19:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-23717</guid>
		<description>What would you recommend if all my programs have paths hardcoded into them? Like &quot;load c:\myprogs\ver1\my_code&quot;. I&#039;m moving to Linux now and contemplating on what to do. Thanks!!</description>
		<content:encoded><![CDATA[<p>What would you recommend if all my programs have paths hardcoded into them? Like &#8220;load c:\myprogs\ver1\my_code&#8221;. I&#8217;m moving to Linux now and contemplating on what to do. Thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NerdRoom@WAKEUP.com</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16260</link>
		<dc:creator>NerdRoom@WAKEUP.com</dc:creator>
		<pubDate>Sun, 03 Jun 2007 17:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16260</guid>
		<description>NerdRoom@WAKEUP.com

Many Nerds won&#039;t be returning.  Some old timers I remember from last year, people like Trenchcoat Mafia, Silk Dragon Shirt, probably won&#039;t be coming back next year.
Spamming blogs I put their names up, immortalizing them, if only until the blog owner erases everything::::
1. Trenchcoat Mafia
2. Silk Dragon Shirt
3. The Distinguished English Gentleman
4. Beta Nerd, and of course
5. Rosie The Transsexual
Rosie&#039;s original name was just Rosie, due to his rosie cheeks.  They shared he has a high level of knowledge, a tactic the gods employ to create a false sense of security.  This of course is the segment which they dump so many transsexuals into.  
I too enjoy irony, and therefore Rosie has now become Rosie The Transsexual.
Who else has a nickname in the NerdRoom?

I&#039;d like to remind you many of the people in the NerdRoom are good men.  I hope this is reflected in what they are allowed to learn and the progress they&#039;re allowed to make.
I&#039;d also like to remind you their predecessors, REAL nerds from a generation ago who fill the computer swap meet, are WONDERFUL men, and since I likely won&#039;t be going again I want to remember them as well.

Actually the comparison of the two is a testiment to the devolution of society, which will be used as justification for the Apocalypse:::
Today&#039;s nerds are NOT wonderful men.  They grew up with the internet and many consider pornography as an acceptable vice.  They gamble freely, enjoy evil imagry in video games, and this issue is a microcosim of our deterioration.</description>
		<content:encoded><![CDATA[<p><a href="mailto:NerdRoom@WAKEUP.com">NerdRoom@WAKEUP.com</a></p>
<p>Many Nerds won&#8217;t be returning.  Some old timers I remember from last year, people like Trenchcoat Mafia, Silk Dragon Shirt, probably won&#8217;t be coming back next year.<br />
Spamming blogs I put their names up, immortalizing them, if only until the blog owner erases everything::::<br />
1. Trenchcoat Mafia<br />
2. Silk Dragon Shirt<br />
3. The Distinguished English Gentleman<br />
4. Beta Nerd, and of course<br />
5. Rosie The Transsexual<br />
Rosie&#8217;s original name was just Rosie, due to his rosie cheeks.  They shared he has a high level of knowledge, a tactic the gods employ to create a false sense of security.  This of course is the segment which they dump so many transsexuals into.<br />
I too enjoy irony, and therefore Rosie has now become Rosie The Transsexual.<br />
Who else has a nickname in the NerdRoom?</p>
<p>I&#8217;d like to remind you many of the people in the NerdRoom are good men.  I hope this is reflected in what they are allowed to learn and the progress they&#8217;re allowed to make.<br />
I&#8217;d also like to remind you their predecessors, REAL nerds from a generation ago who fill the computer swap meet, are WONDERFUL men, and since I likely won&#8217;t be going again I want to remember them as well.</p>
<p>Actually the comparison of the two is a testiment to the devolution of society, which will be used as justification for the Apocalypse:::<br />
Today&#8217;s nerds are NOT wonderful men.  They grew up with the internet and many consider pornography as an acceptable vice.  They gamble freely, enjoy evil imagry in video games, and this issue is a microcosim of our deterioration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16213</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 10 May 2007 15:57:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16213</guid>
		<description>Tim-

filesep is still useful, especially if you might be using drive letters as part of your path on a PC.  / has been the canonical file separator in MATLAB for as long as I can remember (but my memory does fade on some of these things these days!).  It was even more crucial when VMS was around for the VAX and the olden days for the Mac OS.

--loren</description>
		<content:encoded><![CDATA[<p>Tim-</p>
<p>filesep is still useful, especially if you might be using drive letters as part of your path on a PC.  / has been the canonical file separator in MATLAB for as long as I can remember (but my memory does fade on some of these things these days!).  It was even more crucial when VMS was around for the VAX and the olden days for the Mac OS.</p>
<p>&#8211;loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Davis</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16212</link>
		<dc:creator>Tim Davis</dc:creator>
		<pubDate>Thu, 10 May 2007 12:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16212</guid>
		<description>I&#039;ve noticed that in recent MATLAB versions, &quot;filesep&quot; isn&#039;t necessary, if relative paths are used.  For example:

cd ../dir1/dir2

or

cd dir3/dir4

works on both Windows and Linux, but

cd ..\dir1\dir2

cd dir3\dir4

works only on Windows.  The &quot;/&quot; also works where other filenames are expected (opening files, the load command, and so on).  So &quot;/&quot; works just fine on any platform; MATLAB must make the obvious modification internally, which is The Right Thing To Do.  I recall that in some MATLAB version that &quot;/&quot; didn&#039;t work in Windows, and now it does.

As one who writes code that is supposed to port to any MATLAB, Windows/Linux/Mac/etc, this is a welcome fix.

So do we really need filesep anymore?  Just use &quot;/&quot;.  If this is the case, then the &quot;doc filesep&quot; should be updated to suggest using &quot;/&quot; as the platform-independent file separator.

This doesn&#039;t apply to names like C:\whatever, which will always remain singularly Windows-ish.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve noticed that in recent MATLAB versions, &#8220;filesep&#8221; isn&#8217;t necessary, if relative paths are used.  For example:</p>
<p>cd ../dir1/dir2</p>
<p>or</p>
<p>cd dir3/dir4</p>
<p>works on both Windows and Linux, but</p>
<p>cd ..\dir1\dir2</p>
<p>cd dir3\dir4</p>
<p>works only on Windows.  The &#8220;/&#8221; also works where other filenames are expected (opening files, the load command, and so on).  So &#8220;/&#8221; works just fine on any platform; MATLAB must make the obvious modification internally, which is The Right Thing To Do.  I recall that in some MATLAB version that &#8220;/&#8221; didn&#8217;t work in Windows, and now it does.</p>
<p>As one who writes code that is supposed to port to any MATLAB, Windows/Linux/Mac/etc, this is a welcome fix.</p>
<p>So do we really need filesep anymore?  Just use &#8220;/&#8221;.  If this is the case, then the &#8220;doc filesep&#8221; should be updated to suggest using &#8220;/&#8221; as the platform-independent file separator.</p>
<p>This doesn&#8217;t apply to names like C:\whatever, which will always remain singularly Windows-ish.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aslak grinsted</title>
		<link>http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16191</link>
		<dc:creator>aslak grinsted</dc:creator>
		<pubDate>Mon, 23 Apr 2007 08:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2007/04/13/machine-independent-filenames/#comment-16191</guid>
		<description>I can see the use of mfilename. Here&#039;s some code i have in a mfile called wtcsignif... 

persistent mypath
if isempty(mypath)
    mypath=strrep(which(&#039;wtcsignif&#039;),&#039;wtcsignif.m&#039;,&#039;&#039;);
end

wtcsignif is called from many different paths, but i want it to always use its own directory as the cache directory. Here mfilename and fileparts would be better.

My example is from here:
http://www.pol.ac.uk/home/research/waveletcoherence/</description>
		<content:encoded><![CDATA[<p>I can see the use of mfilename. Here&#8217;s some code i have in a mfile called wtcsignif&#8230; </p>
<p>persistent mypath<br />
if isempty(mypath)<br />
    mypath=strrep(which(&#8216;wtcsignif&#8217;),&#8217;wtcsignif.m&#8217;,&#8221;);<br />
end</p>
<p>wtcsignif is called from many different paths, but i want it to always use its own directory as the cache directory. Here mfilename and fileparts would be better.</p>
<p>My example is from here:<br />
<a href="http://www.pol.ac.uk/home/research/waveletcoherence/" rel="nofollow">http://www.pol.ac.uk/home/research/waveletcoherence/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

