= false;
Xtrain = degexpand(xtrain, deg, addOnes);
Xtest  = degexpand(xtest, deg, addOnes);
fs = 14;

%% MLE
modelMLE = linregFit(Xtrain, ytrain); 
[mu, v] = linregPredict(modelMLE, Xtest);

fig1=figure;
hold on;
plot(xtest, mu,  'k-', 'linewidth', 3, 'displayname', 'prediction');
%plot(xtest, ytestNoisefree,  'b:', 'linewidth', 3, 'displayname', 'truth');
plot(xtrain,ytrain,'ro','markersize', 14, 'linewidth', 3, ...
     'displayname', 'training data');
NN = length(xtest);
ndx = 1:5:NN; % plot subset of er