tags:

views:

18

answers:

1

I have two sets of scattered data x y z and x2 y2 z2

The following code should produce two overlapping surface plots

F = TriScatteredInterp(x,y,z);
z2i=F(x2,y2);

tri = delaunay(x,y);

plot = trisurf(tri,x2,y2,z2,'edgeColor','blue','FaceColor','blue','FaceAlpha',.5);
hold on
trisurf(tri,x2,y2,z2i,'edgeColor','red','FaceColor','red','FaceAlpha',.5);

Somehow, the two plots are not even close. Does anyone know how this is possible?

+2  A: 

Since you are moving from first set of x and y to the second set x2 and y2, calculate triangulation based on x2 and y2.

tri = delaunay(x2,y2);

Don't forget hold off at the end.

yuk

related questions