Problem with Interpolation - Scattered Data away from initial points.

1 view (last 30 days)
Hello quys! I want to make interpolation of scattered data (x,y,z). I also plot these points (x,y,z). The matlab code is the following:
Interp_z=scatteredInterpolant(x,y,z);
figure
[qx,qy] = meshgrid(y_start:intervals_y:y_stop,x_start:intervals_x:x_stop);
qz = Interp_z(qx,qy);
mesh(qx,qy,qz);
axis([y_start y_stop x_start x_stop z_start z_stop])
hold on;
plot3(x,y,z,'o');
The problem is that the 3D surface that is created and plotted is away from points (x,y,z). (see picture attached) Could anyone please help me, to find a solution? Any help will be highly appreciated!

Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!