在 MATLAB 中生成三维散点图



请考虑以下示例:

x1 = 13 + 6.*rand(100,1);
x2 = x1.*0.7;
x3 = (x2 + 6).*1.2;
figure(1);
plot(x1);hold on;plot(x2);hold on;plot(x3,'--r');
figure(2);
subplot(311);
scatter(x1,x2);
subplot(312);
scatter(x1,x3);
subplot(313);
scatter(x2,x3);

在这里,我有 3 个高度相关的向量。是否可以在 Matlab 中生成一个包含所有信息的散点图,即显示x1x2之间关系的散点图; x2x3 ; x1x3,可能是 3D 散点图?

scatter3(x1,x2,x3)

有关更多详细信息,请参阅 http://www.mathworks.co.uk/help/matlab/ref/scatter3.html

最新更新