MATLAB: Singular Value Decomposition of a Large XYZ file

singular value decompositionxyz coordinatesxyz data to matrix

Hi everyone, I need to perform Singular Value Decomposition on a XYZ file (surface scan file with 3 columns and millions of row) to simplify the surface. In the papers I have checked in the literature, they present a 2D picture (x-z base) colouring with amplitude (y-height), and state that the fluctuating surface elevation of the surface y(x,z) should be decomposed. Any idea how to turn very narrow randomly lined xyz values into a matrix that we can implement SVD? Cheers.

Best Answer

First thing that occurs to me would be to interpolate the xyz data to lie on a rectangular grid in the x-z plane, and to then apply SVD to the resulting matrix (millions of rows should translate to a number of rows and columns in the thousands?).
Here is a doc example for how to interpolate xyz-data on a grid.