Dear Researchers

Can you please make a correction in my Code of MATLAB

X1=[1,2,3,4]';

X2=[5,6,7,8]';

U1=[9,10,11,12]';

U2=[13,14,15,16]';

for i=1:1:4

EPS1(i,1)= U1(i,1)/X1(i,1);

EPS2(i,1)= U2(i,1)/X2(i,1);

EPS12(i,1)= 0.5*((U1(i,1)/X2(i,1))+(U2(i,1)/X1(i,1)));

defG(i)=[1+U1(i,1)/X1(i,1) 0+U1(i,1)/X2(i,1); 0+U2(i,1)/X1(i,1) 1+U2(i,1)/X2(i,1)];

end

EPS11

EPS22

EPS12

are right but for defoarmation gradient i am getting error of

Subscripted assignment dimension mismatch.

Error in strains (line 11)

defG(i)=[1+U1(i,1)/X1(i,1) 0+U1(i,1)/X2(i,1); 0+U2(i,1)/X1(i,1) 1+U2(i,1)/X2(i,1)];

Kindly correct me where I am wrong.

Regards

Zuhiab

More Zuhaib Nazir's questions See All
Similar questions and discussions