2017-03-06 51 views
0

我有兩組具有XYZ座標的3D數據。我想知道是否有一個程序可以將兩者結合起來,例如:Matlab或原點 - 在一個等高線圖中組合兩組3D數據

一組數據用圖的顏色表示,另一組數據用高度表示(在3D中)的情節。

我熟悉Matlab和Origin。

+4

當然可以。閱讀關於自定義色彩地圖 –

回答

0

可以用surf(Z,C)完成。

a = randi(20,20,20); 
b = randi(20,20,20); 

figure; 
subplot(2,2,1); 
surf(a); 
title('Height'); 

subplot(2,2,2); 
surf(b); 
title('Color'); 

subplot(2,2,[3,4]); 
surf(a,b); 
title('Mixed'); 

不是最好的表示,但你可以看到一個矩陣產生高度,一個產生顏色。

混合地塊的顏色來自右圖

Color matches

高度混合的情節來源於左圖

Height matches

0

如果使用scatter3功能很容易。

w=100; 
x1=rand(1,w); 
y1=rand(1,w); 
z1=rand(1,w)*100; 
z2=ceil(rand(1,w)*255); 
figure 
h=scatter3(x1,y1,z1,ones(1,w)*50,z2,'filled'); 

enter image description here