Borrar filtros
Borrar filtros

How to apply an interpolation between different 3d surfaces?

3 visualizaciones (últimos 30 días)
lei zhang
lei zhang el 10 de Mayo de 2017
Editada: Walter Roberson el 12 de Mayo de 2017
%%plot segment1
s1x=Segment1new(:,3);
s1y=Segment1new(:,4);
s1z=Segment1new(:,5);
mins1x=min(s1x);
maxs1x=max(s1x);
mins1y=min(s1y);
maxs1y=max(s1y);
[S1X,S1Y]=meshgrid(mins1x:int:maxs1x,mins1y:int:maxs1y);
S1Z=griddata(s1x,s1y,s1z,S1X,S1Y);
mesh(S1X,S1Y,S1Z)
%%plot segment2
.......
There are total 5 segments of 3d surfaces in the X-Y-Z coordinate, I want to combine the 5 segments into one smooth plane.
Could anyone know how to do it?

Respuestas (1)

Stephen Jue
Stephen Jue el 12 de Mayo de 2017
Hi,
The interp3 may be what you are looking for. Note that the inputs to this function have to be gridded, not scattered, data.
Alternatively, if you are looking for a flat plane to fit the data, you can do a least-squares fit of the scattered data. In that case, you can refer to this MathWorks Technical Support post.

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by