Plotting 3D for three independent variables without any function
古いコメントを表示
I have four vectors as attached in Data_1.tx. file. I'm looking for a way to plot their surface map. Where X = (:,column3), Y = (:,column 2) and Z = (:,Column 1). I have looked into meshgrid but did not work since I do not have a function to estimate Z from given X and Y Values. They are only data. I have found and tried this below code but did not like the graph.
trisurf(delaunay(X,Y),X,Y,Z)
I have tried Scatter 3 as below and I do not like it. Is there anyway to present them as the below colourful box? Thank you for your help. 


5 件のコメント
Amanullah Khan
2020 年 10 月 12 日
I would like to plot the surface for 3 coulmns. I have plotted the points with the help of scatter3 commands. But I cannot plot the surface. Please could you tell me whichoption will be better for this data.

I would like to have something like this form the above raw data.

Walter Roberson
2020 年 10 月 13 日
Please post the data as a readable file.
Amanullah Khan
2020 年 10 月 14 日
Please find the attached data file
Walter Roberson
2020 年 10 月 14 日
t = readtable('Surface plot.xlsx');
x = t.Temp; y= t.Pressure; z = t.Time;
tri = delaunay(x,y);
trimesh(tri, x, y, z);
Amanullah Khan
2020 年 10 月 19 日
Thank you so much Mr Walter. It worked for me.
採用された回答
その他の回答 (1 件)
M Naeem
2021 年 7 月 23 日
0 投票
can you please help in plotting graph of f(x,y,z)=2x+5xy+11xyz+2z
2 件のコメント
N = 50;
xvec = linspace(-5,5,N);
yvec = linspace(-5,5,N);
zvec = linspace(-5,5,N);
[X,Y,Z] = meshgrid(xvec, yvec, zvec);
fxyz = 2 .* X + 5 .* X .* Y + 11 .* X .* Y .* Z + 2 .* Z;
minf = min(fxyz(:));
maxf = max(fxyz(:));
levels = linspace(minf, maxf, 9);
levels = levels(2:end-1);
nlev = length(levels);
for K = 1:nlev
L = levels(K);
isosurface(X, Y, Z, fxyz, L, fxyz);;
end
camlight; lighting phong
legend( string(levels) );
colorbar
hold off
M Naeem
2021 年 7 月 24 日
Thank you soo much ...
カテゴリ
ヘルプ センター および File Exchange で Vector Volume Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

