clear all; close all; b = input('ent the value for breadth = '); h= input('ent the value for height = '); t= input('ent the thickness of the element = '); E= input('ent the Youngs modulus = '); m= input('ent the Poissions ratio = '); X1=input('ent the value for X1 = '); Y1=input('ent the value for Y1 = '); X2=input('ent the value for X2 = '); Y2=input('ent the value for Y2 = '); X3=input('ent the value for X3 = '); Y3=input('ent the value for Y3 = '); X4=input('ent the value for X4 = '); Y4=input('ent the value for Y4 = '); A=0.5*b*h; Q1=Y2-Y3; Q2=Y3-Y1; Q3=Y1-Y2; R1=X3-X2; R2=X1-X3; R3=X2-X1; Q11=Y4-Y1; Q12=Y1-Y3; Q13=Y3-Y4; R11=X1-X4; R12=X3-X1; R13=X4-X3; B=[Q1 0 Q2 0 Q3 0; 0 R1 0 R2 0 R3; R1 Q1 R2 Q2 R3 Q3]; Strain=B/(2*A); Stress= (E/(1-(m*m)))*[1 m 0; m 1 0; 0 0 ((1-m)/2)]; K1=transpose(Strain)*Stress*Strain*A*t; B1=[Q11 0 Q12 0 Q13 0; 0 R11 0 R12 0 R13; R11 Q11 R12 Q12 R13 Q13]; Strain1=B1/(2*A); Stress1= (E/(1-(m*m)))*[1 m 0; m 1 0; 0 0 ((1-m)/2)]; K2=transpose(Strain1)*Stress1*Strain1*A*t; K=K1+K2;