Plot a surface over a circular domain of given radius using the plot function

1 次查看(过去 30 天)
I have a surface that is the product of a Biharmonic fit. My data set is composed of concentrical circumferences centered at the origin. When I just plot the resultant surface I get the whole thing, so what I want to do is erase everything that is outside a cilinder of a given radius.
I hope that made sense. Thanks in advance for any tips!

回答(1 个)

Pierre845
Pierre845 2018-8-24
If you've got the coordinates of the primary surface X,Y,Z
You can create your cylinder surface which you will get the coordinates X1, Y1, Z1 (fine mesh will be better)
Then you define a tolerance on the coordinates, needs to be large enough to capture neighbour coordinates of the cylinder
Finally you loop on each element of X, Y, Z i.e xi, yi, zi making a proximity test with the coordinates of the cylinder, and if the distance between the coordinates is beyond range, you supress them.
There may simpler/faster solutions .. but if I had to do it myself without any help that's what I would do.
  1 个评论
Jorge Mira Pérez
Jorge Mira Pérez 2018-8-24
Dear Pierre, what I don't know is whether or not it's possible to extract surface data points from a fit function. What I did to plot the surface is the following (cut down to the real basics):
% code
myFit = fit(...)
plot(myFit)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by