From: Rachit on
I have a set of x,y and z coordinates.Can anyone guide me how can I create a surface with these points.

Thanks,

Rac
From: Walter Roberson on
Rachit wrote:
> I have a set of x,y and z coordinates.Can anyone guide me how can I
> create a surface with these points.

That will depend upon what assumptions you want made.

If the set of coordinates forms a "point cloud" and you want a possibly
non-convex surface "around" the cloud, then there are multiple solutions
unless you put some constraints on the surface finding.

If you want to find a convex surface that fits around the points, you can use
the convexhull routines and then trisurf or the like to visualize the
resulting triangles.

If the coordinates form a grid in x and y, then you may be able to use surf()
to visualize the data.

scatter3() is good for visualizing 3D points _without_ a surface.

From: Ralph Schleicher on
"Rachit " <racpsine(a)gmail.com> writes:

Real name?

> I have a set of x,y and z coordinates.Can anyone guide me how can I
> create a surface with these points.

x_grid = linspace(min(x), max(x), 11);
y_grid = linspace(min(y), max(y), 11);

[x_mesh, y_mesh] = meshgrid(x_grid, y_grid);
z_mesh = griddata(x, y, z, x_mesh, y_mesh, 'v4');

surf(x_mesh, y_mesh, z_mesh, 'FaceColor', 'interp', 'FaceAlpha', 0.75);
hold('on');
plot3(x, y, z, 'o', 'MarkerEdgeColor', 'k', 'MarkerFaceColor', 'y');

--
Ralph Schleicher <http://ralph-schleicher.de>

Development * Consulting * Training
Mathematical Modeling and Simulation
Software Tools
From: Rachit on
"Rachit " <racpsine(a)gmail.com> wrote in message <ht1joj$3nt$1(a)fred.mathworks.com>...
> I have a set of x,y and z coordinates.Can anyone guide me how can I create a surface with these points.
>
> Thanks,
>
> Rac

Thank you very much guys...That is what I was looking for....

Rachit :)