2016-04-30 67 views
1

我在数据集1中有1331条4维数据条目。 我还有数据集2中4D数据的1331条目。 我需要使用不同的颜色将这些数据集合在一个plotmatrix中。 如何做到这一点? 这是我到目前为止已经试过Plotmatrix中的多个数据集Matlab

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'); 
+0

欢迎来到堆栈溢出。你试过什么了? –

+0

请发布一些你已经尝试过的代码片段... –

+0

嗨我已经添加了代码片段 –

回答

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)