MatLab code needed: This function figures out which nodes comprise which element
ID: 1841710 • Letter: M
Question
MatLab code needed:
This function figures out which nodes comprise which element. The elements should be numbered using the convention shown below for the case of x Ele = 6, and yEle = 2. Each row of the output will list the four nodes in the corners of that element. For each element, node numbers should start the bottom left of the element and proceed counterclockwise. See the test case below. (E.g. The nodes defining element 5 are in the fifth row of the output and are comprised of 5 6 13 and 12. The nodes defining element 11 are in the 11th row.)Explanation / Answer
solution:
1)here matlab code to find connectivity condition between element of beam is ass follows
matlab code:
function(ele)=beam connectivity(xele,yele)
xele=input('enetrnumber of x element');
yele=input('enter number of y element');
nn=xele*yele;
for i=1:nn/2
Ll(i,1)=i;
Lr(i,1)=i+1;
Ur(i,1)=xele*(yele-1)+i+2;
Ul(i,1)=xele*(yele-1)+i+1;
end;
for i=.5nn+1:nn
Ll(i,1)=i-xele*(yele-1);
Lr(i,1)=(i+1)-xele*(yele-1);
Ur(i,1)=i+2;
Ul(i,1)=i+1;
end;
for i=1:nn
ar(i,1)=[Ll(i,1),Lr(i,1),Ur(i,1),Ul(i,1)];
end
fprintf('%d=%f',i,ar(i,1));
end