Code covered by the BSD License  

Highlights from
Introduction to Statistics Toolbox - July 2007 Webinar Files

image thumbnail

Introduction to Statistics Toolbox - July 2007 Webinar Files

by

 

17 Jul 2007 (Updated )

Presentation and demo files for the "Introduction to Statistics Toolbox™" Webinar (July 12, 2007)

myPlot(X1, Y1, r2, lab)
function myPlot(X1, Y1, r2, lab)
% myPlot(X1,Y1,r2)
%  X1:  Actual MPG
%  Y1:  Model MPG
%  r2:  R2 value of the fit

% Copyright 2007 The MathWorks, Inc.

%  Auto-generated by MATLAB on 09-Jul-2007 15:27:56

% Create figure
figure1 = figure;

% Create axes
axes('Parent',figure1,'YGrid','on','XGrid','on');
box('on');
hold('all');

% Create plot
plot(X1,Y1,'Marker','.','LineStyle','none');

% Create xlabel
xlabel('Actual MPG');

% Create ylabel
ylabel('Model MPG');

% Create title
title(sprintf('Regression Fit of MPG, R^2 = %4.2f (%s)', r2, lab));

% Create plot
plot([0, max(X1)], [0, max(X1)],'LineWidth',4,'Color',[1 0 0]);

axis equal;

xlim([0 max(X1)]);
ylim([0 max(X1)]);

Contact us