2016-04-30 64 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)