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

2 Ansichten (letzte 30 Tage)
javm6
javm6 am 9 Feb. 2021
Kommentiert: darova am 14 Feb. 2021
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 Kommentare
javm6
javm6 am 14 Feb. 2021
Thanks for your answer, I tried it but I think that it is not the solution that I am looking for.
darova
darova am 14 Feb. 2021
All your matrices are 3d, i suppose you have data to display volume? Can you explain more? WHat are you trying to achieve?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Star Strider
Star Strider am 9 Feb. 2021
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.

Community Treasure Hunt

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

Start Hunting!

Translated by