Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i make my scattered 3 dimensional data points as a 3d surface?

4 ビュー (過去 30 日間)
Ranjini Anbu
Ranjini Anbu 2015 年 1 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I am having the matrix k where each row represents a 3dimensional point.Each column of the matrix represents the respective dimensional value of each point.How can i make the 3d surface for the matrix?Kindly need help as soon as possible. >> k
k =
1.0e+03 *
0.0124 8.6000 0.0308
0.0099 9.8400 0.0355
0.0108 8.3200 0.0347
0.0118 8.0800 0.0490
0.0127 8.5800 0.0327
0.0133 7.8600 0.0438
0.0141 8.1600 0.0322
0.0102 8.1800 0.0490
0.0101 8.6800 0.0322
0.0134 8.1000 0.0372
0.0134 8.3000 0.0338
0.0130 7.3600 0.0550
0.0137 7.1200 0.0323
0.0096 9.1200 0.0372
0.0179 7.4800 0.0283
0.0100 8.4900 0.0372
Thanks in advance.

回答 (1 件)

Alessandro Masullo
Alessandro Masullo 2015 年 1 月 27 日
tri = delaunay(k(:,1),k(:,2));
trisurf(tri,k(:,1),k(:,2),k(:,3))
  2 件のコメント
Ranjini Anbu
Ranjini Anbu 2015 年 1 月 30 日
Thanks for your answer.But i need to draw surface like this.
Alessandro Masullo
Alessandro Masullo 2015 年 2 月 5 日
The surface in your image is provided on a regular grid, while your data are not. You need to interpolate your data on a structured grid (created with meshgrid) using scatteredInterpolant.
k = 1.0e+03 *[ 0.0124 8.6000 0.0308
0.0099 9.8400 0.0355
0.0108 8.3200 0.0347
0.0118 8.0800 0.0490
0.0127 8.5800 0.0327
0.0133 7.8600 0.0438
0.0141 8.1600 0.0322
0.0102 8.1800 0.0490
0.0101 8.6800 0.0322
0.0134 8.1000 0.0372
0.0134 8.3000 0.0338
0.0130 7.3600 0.0550
0.0137 7.1200 0.0323
0.0096 9.1200 0.0372
0.0179 7.4800 0.0283
0.0100 8.4900 0.0372];
f = scatteredInterpolant(k(:,1),k(:,2),k(:,3),'natural','linear');
[x,y] = meshgrid(linspace(min(k(:,1)),max(k(:,1)),50),linspace(min(k(:,2)),max(k(:,2)),50));
z = f(x,y);
figure
surf(x,y,z)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by