This function generates brick mesh according to grid set by vectors xx, yy, and zz.
[Nodes, Rectangles]=Rectangles_Mesh(xx,yy);
[Nodes3D,Bricks] = Mesh2D_to_Mesh3D(Nodes,Rectangles,zz);
input:
xx, yy, and zz are vectors for grids of size (Nx,1) , (Ny,1), and (Nz,1) , respectively.
output:
Nodes3D (Nx*Ny*Nz,3) is a matrix of coordinates of the mesh nodes.
Bricks((Nx-1)*(Ny-1)*(Nz-1),8) is a matrix of nodes connectivity for each element in right hand rule direction.
Example file is provided
Cite As
Ayad Al-Rumaithi (2025). Generate Brick Mesh (https://www.mathworks.com/matlabcentral/fileexchange/92263-generate-brick-mesh), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2017b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.