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

조회 수: 2 (최근 30일)
javm6
javm6 2021년 2월 9일
댓글: darova 2021년 2월 14일
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