3D Surface plot with spline interpolation
显示 更早的评论
I am trying to plot 2d data in the 3d plane to create a surface that represents the effects of changing z.
Data: Each column of my data represents a X, Y, and a Z value respectively.
@ z=12 I have the data.
d =
0.3000 0 12.0000
0.2898 0.0776 12.0000
0.2598 0.1500 12.0000
0.2121 0.2121 12.0000
0.1500 0.2598 12.0000
0.0776 0.2898 12.0000
0.0000 0.3000 12.0000
-0.1165 0.4347 12.0000
-0.2250 0.3897 12.0000
-0.4243 0.4243 12.0000
-0.7794 0.4500 12.0000
-0.8693 0.2329 12.0000
-0.9000 0.0000 12.0000
-0.8693 -0.2329 12.0000
-0.7794 -0.4500 12.0000
-0.6364 -0.6364 12.0000
-0.4500 -0.7794 12.0000
-0.2329 -0.8693 12.0000
-0.0000 -0.9000 12.0000
0.2329 -0.8693 12.0000
0.4500 -0.7794 12.0000
0.5303 -0.5303 12.0000
0.3897 -0.2250 12.0000
0.4347 -0.1165 12.0000
0.3000 -0.0000 12.0000
@ z=14 I have the data.
d =
-0.2121 0.2121 14.0000
-0.6495 0.3750 14.0000
-0.8693 0.2329 14.0000
-0.9000 0.0000 14.0000
-0.8693 -0.2329 14.0000
-0.7794 -0.4500 14.0000
-0.6364 -0.6364 14.0000
-0.4500 -0.7794 14.0000
-0.2329 -0.8693 14.0000
-0.0000 -0.6000 14.0000
0.0388 -0.1449 14.0000
@ z=16 I have the data.
d =
-0.8693 0.2329 16.0000
-0.9000 0.0000 16.0000
-0.8693 -0.2329 16.0000
-0.7794 -0.4500 16.0000
-0.6364 -0.6364 16.0000
In order to use Matlab's built in surface command I need to have the different levels of Z to be of equal dimensions. Therefor I am trying to interpolate the data so that each set of z values have 50 rows and give the surface a round effect. Unfortunately I am not able to successfully do this. I have looked throughout Matlab Central to find a similar problem with a solution and was not able to find anything. Could you guys help me out or point me in the right direction please?
回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Spline Postprocessing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!