a rectangular grid for two rectangles

Hello, I am trying to generate a rectangular mesh for a network of two and more rectangles that are in a stack. For each of them the mesh needs to be defined separately. Below is a piece of my code where I tried to define the geometry for two rectangles but I'm getting error message about wrong matrix dimensions. I would be very grateful if somebody can help me resolve this problem.
%% Geometry and Mesh
width = 0.3; height = 0.0001;
gdmTrans = [3 4 0 width width 0 0 0 height height]+ [3 4 0 width width 0 height height 2*height 2*height];
g = decsg(gdmTrans', 'S1', ('S1')');
[p,e,t]=poimesh(g,width/5e-3,height/0.005e-3);
figure;
pdemesh(p,e,t);
pdeplot(p,e,t);
title 'Plate With Triangular Element Mesh'
xlabel 'X [m]'
ylabel 'Y [m]'
Thank you very much in advance, Natalia

Antworten (0)

Gefragt:

am 6 Jun. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by