www.gusucode.com > stats 源码程序 matlab案例代码 > stats/MainEffectsPlotExample.m

    %% Main Effects Plot
%%
% Load the sample data.

% Copyright 2015 The MathWorks, Inc.

load carsmall;
%%
% Display main effects plots for car weight with two grouping variables,
% model year and number of cylinders.
maineffectsplot(Weight,{Model_Year,Cylinders}, ...
               'varnames',{'Model Year','# of Cylinders'})