Obtain contours with a 3D geometry and a contour function in a 3D space

2 次查看(过去 30 天)
Hi! I am wondering if it is possible to use a function similar to contour with more dimensions.
I usually use contour with two matrixes of coordinates X and Y (generates with meshgrid, ''grid_X'' and ''grid_Y'') and an interpolated function (generate with griddata)
[C,h] = contour(grid_X,grid_Y,int_function);
When I am in a 2D geometry it works. However, I need one more dimension now i.e. I have to use X,Y,Z and an interpolated function as contour function.
Is there a function similar to ''contour'' (or a method) to use in this case?
As an example of what I want I show the following image in which I have the coordinates of the sphere grid_X, grid_Y and grid_Z (all of them with dimensions 101 x 101 x 101) and the surface to generate the contours int_function with dimensions 101 x 101 x 101 as well.
  3 个评论
javm6
javm6 2021-2-14
Thanks for your answer, I tried it but I think that it is not the solution that I am looking for.
darova
darova 2021-2-14
All your matrices are 3d, i suppose you have data to display volume? Can you explain more? WHat are you trying to achieve?

请先登录,再进行评论。

回答(1 个)

Star Strider
Star Strider 2021-2-9
I would use contour3 to plot contours in 3D. I have no idea if it would reproduce the figure in your Question, however it is definitely the place to begin. Another function that could be useful to get a similar result is rotate.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by