How to format surface data into XYZ point cloud?

Illustration
flemingtb - 2022-02-19T11:11:15+00:00
Question: How to format surface data into XYZ point cloud?

I have a .csv data set that is 10x22 surface data and i'd like to convert it to XYZ point cloud. What is the best way to do this in Matlab?  

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

vector_of_x = as appropriate
vector_of_y = as appropriate
[X, Y] = meshgrid(vector_of_x, vector_of_y);
points = [X(:), Y(:), z(:)];
ptCloud = pointcloud(points);
pointCloud is part of the Computer Vision Toolbox
pointCloud() is a particular data type in MATLAB. If you do not have Computer Vision, then you cannot create the datatype, so it is not clear what you want to do? If you just want an array of three columns, X, Y, Z, and you are starting from a 2D array, then use the code I posted but stop after the assignment to points


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!