Create a coordinate system (x, y, z) matrix
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Iliqe
el 23 de Feb. de 2022
The idea is to build a dataset of coordinates matrix with 3 coordinates along X, Y, and Z. The data which I have are:
% min and max coordinates of the dataset
Xmin = 388363.3 Xmax = 390229.2
Ymin = 3310114 Ymax = 3311144
Zmin = 2027.96 Zmax = 2889.9
% sub-block size along x, y, z:
dx = 20; dy = 20; dz = 10;
% number of layers along x, y, z:
nx = 95; ny = 53; nz = 88;
The resulting dataset starts with the min values of coordinates and goes up to max coordnates. The result is a matrix with 3 columns X, Y, and Z and the coordinates below, which correspond to the number of layers and sub-block size. And the result if you imagine will look like a big rectange with many subblocks.
I tried with a nested loop with some logic statements, but it is just produce the wrong coordinates. I think that I coded it incorrectly. If you need more info or details, please ask. Thank you for attention.
0 comentarios
Respuesta aceptada
David Hill
el 23 de Feb. de 2022
Editada: David Hill
el 23 de Feb. de 2022
Xmin = 388363.3;
Xmax = 390229.2;
Ymin = 3310114;
Ymax = 3311144;
Zmin = 2027.96;
Zmax = 2889.9;
[X,Y,Z]=meshgrid(linspace(Xmin,Xmax,95),linspace(Ymin,Ymax,53),linspace(Zmin,Zmax,88));
scatter3(X(:),Y(:),Z(:));
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation of 2-D Selections in 3-D Grids 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!