Gridding a large XYZ data set with limited memory

2 views (last 30 days)
Hi,
I am trying to make a regular XYZ file from a large point cloud XYZ data set, but am hitting a 'not enough memory' error.
The code I am using is:
%load height file
hp=csvread(h_file);
%make a regular XYZ file
mins=min(hp);
maxs=max(hp);
rmins=round(mins);
rmaxs=round(maxs);
gridmin=rmins-1;
gridmax=rmaxs+1;
[xq,yq]=meshgrid(gridmin(1):pDiam:gridmax(1), gridmin(2):pDiam:gridmax(2));
vq=griddata(hp(:,1),hp(:,2),hp(:,3),xq,yq,'v4');
Is there perhaps a more elegant way to achieve the same thing using less memory (avoiding trying to solve the problem by brute force of using more memory)?

Answers (0)

Community Treasure Hunt

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

Start Hunting!