1

我在数据集 1 中有 1331 个 4 维数据条目。我在数据集 2 中也有 1331 个 4D 数据条目。我需要使用不同颜色将这些数据集一起绘制在一个绘图矩阵中。怎么做 ?这是我迄今为止尝试过的

plotmatrix([w01 ,w02, w03,w04]);hold on
plotmatrix([w11 ,w12, w13,w14]);

在散点图的情况下效果很好

scatter3(w01 ,w02, w03,'filled')
hold on;
scatter3(w11 ,w12, w13,'filled');
hold on;
scatter3(w21 ,w22, w23,'filled');
4

1 回答 1

1

如果其他人想知道,gplotmatrix 是您的朋友。尝试这个:

V1 = rand(100,3);         % a random vector
V2 = sin(V1);             % a function of V1
groups = (V2(:,1)>0.3)*1; % defining groups for discriminating the variables.
gplotmatrix(V1,V2,groups)
于 2017-01-18T15:46:47.940 回答