Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 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