<pre class="codeinput"><span class="comment">% This file is from pmtk3.googlecode.com</span>


<span class="keyword">function</span> [X,y] = contoursSSEdemo(doPlot)

<span class="keyword">if</span> nargin &lt; 1, doPlot = false; <span class="keyword">end</span>

setSeed(2);
n = 20;
x = randn(n,1);
<span class="comment">%x = (-3:0.5:3)';</span>
<span class="comment">%n = length(x);</span>
wtrue = [1 1];
sigma = 1;
y = wtrue(1) + wtrue(2)*x + sigma*randn(n,1);


X = [ones(n,1),x];
w = X\y; <span class="commen