span>
<span class="comment">%PMTKurl  http://people.cs.ubc.ca/~schmidtm/Software/minFunc/minFunc.html</span>
</pre><pre class="codeinput"><span class="comment">% This file is from pmtk3.googlecode.com</span>

options.Display = <span class="string">'none'</span>;
setSeed(1);
nClasses = 5;
nInstances = 1000;
<span class="comment">%nInstances = 100;</span>
nVars = 2;
[X,y] = makeData(<span class="string">'multinomial'</span>,nInstances,nVars,nClasses);

<span class="comment">% Add bias</span>
X0 = X;
X = [ones