I tried using thegriddatafunction in MATLAB, but that didn't sum together the weights at each grid (it interpolates between the values): grid_width = 4;% Width of grid (m) grid_step = 0.1;% Grid step size (m) grid_hits = find(abs(x_coordinates) <= 0.5*grid_width &... ...
Z_interpolated = griddata(X(validMask), Y(validMask), Z_matrix(validMask), X, Y,'linear'); % Replace Z_matrix with interpolated data Z_matrix = Z_interpolated; %% Step 2: Visualize the Depth Map figure; surf(X, Y, Z_matrix,'EdgeColor',...
Zm = griddata(x, y, z, Xm, Ym); figure contourf(Xm, Ym, Zm) grid I am using this code but it does not work. error:x must not be scaler Anyone can help? Answers (1) Star Strideron 6 Jun 2020 Vote 0 Link Open in MATLAB Online ...
scatter(x,z) does now give a graph, sorry, possibly as a result of clearing some previous code.