Plot a 3D map surface with xyzz, where I want one of the z-axis to be the color bar and the other 3 variables to be the axis

3 ビュー (過去 30 日間)
I have the values, where first column is time, 2nd is temperature, 3rd is particle size, then the yield. I want the yield to be the color bar and the first 3 column to be the axis xyz
0.1846, 400, 0.42, 12
0.1846, 500, 0.42, 13.9
0.1846, 600 , 0.42 , 15.7
0.4 , 500, 1.5, 2.77
4.4, 550, 0.55, 16.43
37.11, 450, 0.55 , 28.04
37.11, 550, 0.55 , 24.47

採用された回答

DGM
DGM 2022 年 1 月 28 日
If I'm understanding this correctly:
A = [0.1846 400 0.42 12;
0.1846 500 0.42 13.9;
0.1846 600 0.42 15.7;
0.4 500 1.5 2.77;
4.4 550 0.55 16.43;
37.11 450 0.55 28.04;
37.11 550 0.55 24.47];
xf = linspace(min(A(:,1)),max(A(:,1)),100);
yf = linspace(min(A(:,2)),max(A(:,2)),100).';
z = griddata(A(:,1),A(:,2),A(:,3),xf,yf,'linear');
c = griddata(A(:,1),A(:,2),A(:,4),xf,yf,'natural');
surf(xf,yf,z,c); hold on
scatter3(A(:,1),A(:,2),A(:,3),50,'k')
colorbar
colormap(parula)
shading flat

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by