<?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>Elliott C. Back &#187; Matlab</title>
	<atom:link href="http://elliottback.com/wp/category/computers-technology/code/matlab/feed/" rel="self" type="application/rss+xml" />
	<link>http://elliottback.com/wp</link>
	<description>Internet &#38; Technology</description>
	<lastBuildDate>Mon, 26 Dec 2011 06:16:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>US States GIS Dataset</title>
		<link>http://elliottback.com/wp/us-states-gis-dataset/</link>
		<comments>http://elliottback.com/wp/us-states-gis-dataset/#comments</comments>
		<pubDate>Tue, 30 Nov 2004 09:27:05 +0000</pubDate>
		<dc:creator>Elliott Back</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Matlab]]></category>

		<guid isPermaLink="false">/?p=149</guid>
		<description><![CDATA[As promised, I&#8217;ve got the cleaned up US state boundary data, perfect for creating visualizations in Excel or Matlab.  It&#8217;s a dataset of (x,y) points for each state, cleaned so that all of the state boundaries lie exactly on top of each other.  So, the map is a continuous set of polygons.  [...]]]></description>
			<content:encoded><![CDATA[<p>As promised, I&#8217;ve got the cleaned up US state boundary data, perfect for creating visualizations in Excel or Matlab.  It&#8217;s a dataset of (x,y) points for each state, cleaned so that all of the state boundaries lie exactly on top of each other.  So, the map is a continuous set of polygons.  Here are a couple pictures:</p>
<p><a href="http://elliottback.com/wp/wp-content/us-map-excel.png" title=""><img src="http://elliottback.com/wp/wp-content/thumb-us-map-excel.png" width="200" height="138" alt="" style="float:left; padding-right:15px;"/></a><a href="http://elliottback.com/wp/wp-content/us-map-demo.png" title=""><img src="http://elliottback.com/wp/wp-content/thumb-us-map-demo.png" width="200" height="167" alt="" style="float:left; padding-right:15px;"/></a><span style="clear:left;"></span></p>
<p>Download it in <a href="http://elliottback.com/wp/wp-content/us-state-boundaries.mat" title="Matlab .mat">Matlab .mat</a> or  <a href="http://elliottback.com/wp/wp-content/us-state-boundaries.xls" title="Excel .xls">Excel .xls</a>, and feel free to use it in any projects.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.gif" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://elliottback.com/wp/us-states-gis-dataset/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Modified Gram-Schmidt Orthogonalization in Matlab</title>
		<link>http://elliottback.com/wp/modified-gram-schmidt-orthogonalization-in-matlab/</link>
		<comments>http://elliottback.com/wp/modified-gram-schmidt-orthogonalization-in-matlab/#comments</comments>
		<pubDate>Sat, 16 Oct 2004 21:50:03 +0000</pubDate>
		<dc:creator>Elliott Back</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Matlab]]></category>

		<guid isPermaLink="false">/?p=17</guid>
		<description><![CDATA[Without any ado at all, I present Matlab 6.5 code to do Modified Gram-Schmidt Orthogonalization, otherwise known as QR Factorization.  You can use a QR factorization to compute a number of things, the least of which is the least squares solution, which can be computed in the following manner:

Start with Ax ~= b, where [...]]]></description>
			<content:encoded><![CDATA[<p>Without any ado at all, I present Matlab 6.5 code to do Modified Gram-Schmidt Orthogonalization, otherwise known as QR Factorization.  You can use a QR factorization to compute a <a href="http://mathworld.wolfram.com/QRDecomposition.html">number of things</a>, the least of which is the least squares solution, which can be computed in the following manner:</p>
<ol>
<li>Start with Ax ~= b, where A is mxn, m > n (overdetermined system)</li>
<li>Compute A = Q * [R O]^T^, where Q is an orthogonal mxn matrix and R is an nxn upper triangular matrix</li>
<li>Multiply  Q^T^ * b to find new right hand side [c1 ... cn]^T^</li>
<li>Use back-substitution to solve R * x = [c1 ... cn]^T^ for x</li>
</ol>
<p>Great!! Now you can find your own best fit lines.  Here&#8217;s the QR factorization algorithm:</p>
<p><font color="blue">function</font> [q, r] = QR(A)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[m, n] = <font color="blue">size</font>(A);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q = zeros(m, n);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r = zeros(n, n);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">for</font> k = 1:n<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r(k,k) = norm(A(1:m, k));</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">if</font> r(k,k) == 0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">break</font>;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">end</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q(1:m, k) = A(1:m, k) / r(k,k);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">for</font> j = k+1:n<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r(k, j) = dot(q(1:m, k), A(1:m, j));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A(1:m, j) = A(1:m, j) &#8211; r(k, j) * q(1:m, k);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">end</font><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">end</font></p>
]]></content:encoded>
			<wfw:commentRss>http://elliottback.com/wp/modified-gram-schmidt-orthogonalization-in-matlab/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.159 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-10 07:16:49 -->

