Main Content

join

Join two object meshes

Since R2022a

Description

joinedMesh = join(mesh1,mesh2) joins the object meshes mesh1 and mesh2 and returns joinedMesh with the combined objects.

example

Examples

collapse all

Create extendedObjectMesh objects and join them together.

Construct two meshes of unit dimensions.

sph = extendedObjectMesh('sphere');
cub = extendedObjectMesh('cuboid');

Join the two meshes.

cub = translate(cub,[0 0 1]);
sphCub = join(sph,cub);

Visualize the final mesh.

show(sphCub);

Figure contains an axes object. The axes object contains an object of type patch.

Input Arguments

collapse all

Extended object mesh, specified as an extendedObjectMesh object.

Extended object mesh, specified as an extendedObjectMesh object.

Output Arguments

collapse all

Joined object mesh, specified as an extendedObjectMesh object.

Version History

Introduced in R2022a