<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael Ewens &#187; matlab</title>
	<atom:link href="http://michaelewens.com/tag/matlab/feed/" rel="self" type="application/rss+xml" />
	<link>http://michaelewens.com</link>
	<description>Tepper School of Business, Carnegie Mellon Univ.</description>
	<lastBuildDate>Tue, 10 Jan 2012 19:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create a dated log file in Matlab</title>
		<link>http://michaelewens.com/2009/07/23/create-a-dated-log-file-in-matlab/</link>
		<comments>http://michaelewens.com/2009/07/23/create-a-dated-log-file-in-matlab/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 16:33:32 +0000</pubDate>
		<dc:creator>Michael Ewens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://michaelewens.com/2009/07/23/create-a-dated-log-file-in-matlab/</guid>
		<description><![CDATA[If you change your datasets or code a lot in Matlab, it is smart to keep track of the results over time (trust me&#8230;.). The &#8216;diary&#8217; function allows you to record all output of your scripts to a file. Append your main .m file with the following code to create a diary/log file that is [...]]]></description>
			<content:encoded><![CDATA[<p>If you change your datasets or code a lot in Matlab, it is smart to keep track of the results over time (trust me&#8230;.).  The &#8216;diary&#8217; function allows you to record all output of your scripts to a file.  Append your main .m file with the following code to create a diary/log file that is uniquely dated to the time (to the minute) that you ran the script:</p>
<p><code>date_now = clock;</code><br />
<code>date_now = strcat(num2str(date_now(1)),'_',num2str(date_now(2)),'_', num2str(date_now(3)), num2str(date_now(4)), num2str(date_now(5)));</code><br />
<code>diary(strcat('log', date_now,'.log'));</code></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelewens.com/2009/07/23/create-a-dated-log-file-in-matlab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple Bootstrap Sample in Matlab</title>
		<link>http://michaelewens.com/2009/03/25/simple-bootstrap-sample-in-matlab/</link>
		<comments>http://michaelewens.com/2009/03/25/simple-bootstrap-sample-in-matlab/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 08:39:38 +0000</pubDate>
		<dc:creator>Michael Ewens</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://michaelewens.com/?p=171</guid>
		<description><![CDATA[Let x be your vector of data which has to be bootstrapped. For each instance of the loop write: x = x(floor(rows(x)*rand(rows(x),1))+1,:); % bootstrap observations Now we have a matrix with the same number of rows and columns, but with re-sampled data with replacement. A one line bootstrap! (Modified code from John Cochrane)]]></description>
			<content:encoded><![CDATA[<p>Let x be your vector of data which has to be <a href="http://en.wikipedia.org/wiki/Bootstrapping">bootstrapped</a>. For each instance of the loop write:</p>
<p><code>x = x(floor(rows(x)*rand(rows(x),1))+1,:); % bootstrap observations</code></p>
<p>Now we have a matrix with the same number of rows and columns, but with re-sampled data with replacement. A one line bootstrap! (Modified code from John Cochrane)</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelewens.com/2009/03/25/simple-bootstrap-sample-in-matlab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Remote Files in Matlab</title>
		<link>http://michaelewens.com/2009/03/24/using-remote-files-in-matlab/</link>
		<comments>http://michaelewens.com/2009/03/24/using-remote-files-in-matlab/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 08:37:31 +0000</pubDate>
		<dc:creator>Michael Ewens</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[remote access]]></category>

		<guid isPermaLink="false">http://michaelewens.com/?p=169</guid>
		<description><![CDATA[If you have an FTP server set-up somewhere with ample space and bandwidth, Matlab can store and retrieve its files and data remotely. Just use these simple commands to connect and disconnect: % File to connect to the server where my Matlab/data resides % connect to the db f = ftp('yourdomain.com', 'user', 'password'); % change [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an FTP server set-up somewhere with ample space and bandwidth, Matlab can store and retrieve its files and data remotely. Just use these simple commands to connect and disconnect:</p>
<p><code>% File to connect to the server where my Matlab/data resides</p>
<p>% connect to the db<br />
f = ftp('yourdomain.com', 'user', 'password');</p>
<p>% change the directory<br />
cd(f, 'matlab');</p>
<p>% now change the directory that we want to download the directory<br />
cd '/';</p>
<p>% Download the directory<br />
mget(f, 'remote_dir');</p>
<p>% *****************<br />
% INSERT PROGRAM HERE<br />
% *****************</p>
<p>% when done move a directory here<br />
cd ..<br />
% now move the directory back to the server<br />
mput(f, 'remote_dir');<br />
disp('Files have been put back on the server');</p>
<p>% close the connect<br />
close(f);</code></p>
]]></content:encoded>
			<wfw:commentRss>http://michaelewens.com/2009/03/24/using-remote-files-in-matlab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

