:,i), 1);
  Xpred(:,i) = colvec(x);
<span class="keyword">end</span>

<span class="comment">% Now plot posterior predictive</span>
[p, xgrid1, xgrid2] = ksdensity2d(Xpred');
figure;
contour(xgrid1, xgrid2, p)
hold <span class="string">on</span>
plot(Xpred(1,:), Xpred(2,:), <span class="string">'.'</span>);
plot(data(:,1), data(:,2), <span class="string">'x'</span>, <span class="string">'color'</span>, <span class="string">'r'</span>, <span class="keyword">...</span>
  <span class="string">'markersize'</span