how to convert ?3d meshgrid data to 3d matrix.

5 visualizaciones (últimos 30 días)
Dongsu Lim
Dongsu Lim el 13 de Dic. de 2019
Respondida: Sai Bhargav Avula el 17 de Feb. de 2020
i have a 3 2dimension data.
x(100x100)
y(100x100)
z(100x100)
i want 3 dimension data. like MRI data.
data(100x100x100);
example code
R=5;
r=1;
u=linspace(0,2*pi,100);
v=linspace(0,2*pi,100);
[u,v]=meshgrid(u,v);
x=(R+r.*cos(v)).*cos(u);
y=(R+r.*cos(v)).*sin(u);
z=r.*sin(v);
figure(1)
mesh(x,y,z);
x,y,z to data(100x100x100)
pliz help me
  1 comentario
darova
darova el 13 de Dic. de 2019
It's impossible. You have a surface and want to find a volume?

Iniciar sesión para comentar.

Respuestas (1)

Sai Bhargav Avula
Sai Bhargav Avula el 17 de Feb. de 2020
Hi,
As mentioned by darova, it is not possible to create the 3D data. The u v are the corrdinate matrices which are used to calculate the x,y and z values. These x,y,z values correspond to the values of the functions that were used to calculate them at that particular corrdinate. This information cannot be stacked up to from a 3D martix(as because the info you have is of the surface).
In simple terms, you have information of around 30000 points and to create the data you need 1000000 points.
Hope this explains!

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by