简体   繁体   English

Plotmatrix Matlab 中的多个数据集

[英]Multiple dataset in Plotmatrix Matlab

I have 1331 entries of 4 dimensional data in DataSet 1. I also have 1331 entries of 4D data in Dataset 2. I need to plot these datasets together in one plotmatrix using different colours.我在数据集 1 中有 1331 个 4 维数据条目。我在数据集 2 中有 1331 个 4D 数据条目。我需要使用不同颜色将这些数据集绘制在一个 plotmatrix 中。 How to do that ?怎么做 ? This is what i have tried so far这是我迄今为止尝试过的

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

It works well in the case of scatter plot在散点图的情况下效果很好

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

In case anybody else wonders, gplotmatrix is your friend.万一其他人想知道, gplotmatrix 是您的朋友。 Try this:尝试这个:

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)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM