x1 = normrnd(5,1,100,1)‘;
x2 = normrnd(6,1,200,1)‘;
X = [x1 x2];
G = [zeros(size(x1)) ones(size(x2))];
boxplot(X, G); %如果组别非常多,建议用compact格式: boxplot(X, G,‘plotstyle‘,‘compact‘);
时间: 2024-10-01 07:55:08
x1 = normrnd(5,1,100,1)‘;
x2 = normrnd(6,1,200,1)‘;
X = [x1 x2];
G = [zeros(size(x1)) ones(size(x2))];
boxplot(X, G); %如果组别非常多,建议用compact格式: boxplot(X, G,‘plotstyle‘,‘compact‘);