I'd do something like this (untested)
% Do the regression:
coeffs = polyfit(xTraining, yTraining, 1);
% Print coefficients to command window
coeffs(1)
coeffs(2)
% Fit some new x range (may be higher resolution than the training x if you want).
x = linspace(startingX, endingX, numberOfSamples);
% Do the fit
yFitted = polyval(coeffs, x);
% Plot the fit.
plot(x, yFitted, 'b-', 'LineWidth', 3);
hold on;
% Along with it, plot the original training data:
plot(xTraining, yTraining, 'rs');