function ke = Ke2Diso(E, nu, Xe, Ye)
E_matrix = E/(1-nu^2)*[1 nu 0;nu 1 0;0 0 (1-nu)/2];
N1 = ((1-zeta)*(1+eta))/4;
N2 = ((1+zeta)*(1+eta))/4;
N3 = ((1-zeta)*(1-eta))/4;
N4 = ((1+zeta)*(1-eta))/4;
dxdzeta =dxdzeta+ Xe(i)*diff(N(i),zeta);
dxdeta =dxdeta+ Xe(i)*diff(N(i),eta);
dydzeta =dydzeta+ Ye(i)*diff(N(i),zeta);
dydeta =dydeta+ Ye(i)*diff(N(i),eta);
J = [dxdzeta dydzeta;dxdeta dydeta];
B_xy(1,i) = diff(N(i),zeta);
B_xy(2,i) = diff(N(i),eta);
B_e = [dNdx_dNdy(1,1) 0 dNdx_dNdy(1,2) 0 dNdx_dNdy(1,3) 0 dNdx_dNdy(1,4) 0;...
0 dNdx_dNdy(2,1) 0 dNdx_dNdy(2,2) 0 dNdx_dNdy(2,3) 0 dNdx_dNdy(2,4) ;...
dNdx_dNdy(2,1) dNdx_dNdy(1,1) dNdx_dNdy(2,2) dNdx_dNdy(1,2) dNdx_dNdy(2,3) dNdx_dNdy(1,3) dNdx_dNdy(2,4) dNdx_dNdy(1,4)];
B = B_e_new(1/sqrt(3),1/sqrt(3))+B_e_new(1/sqrt(3),-1/sqrt(3))+B_e_new(-1/sqrt(3),-1/sqrt(3))+B_e_new(-1/sqrt(3),1/sqrt(3))
E_matrix_new = subs(E_matrix)
J_new = subs(J,[zeta,eta],[1/sqrt(3),1/sqrt(3)])+subs(J,[zeta,eta],[-1/sqrt(3),1/sqrt(3)])+subs(J,[zeta,eta],[-1/sqrt(3),-1/sqrt(3)])+subs(J,[zeta,eta],[1/sqrt(3),-1/sqrt(3)])
ke = det(J_new)*(transpose(B)*E_matrix_new*B)
Unable to perform assignment because value of type 'sym' is not convertible to 'double'.
Error in Ke2Diso (line 31)
B_xy(1,i) = diff(N(i),zeta);
Error in K_assembly (line 15)
ke = Ke2Diso(E, nu, Xe, Ye);
Error in Main2DElastic (line 24)
K = K_assembly(ne, nnodes, X, Y, E, nu, nodemap);
Unable to convert expression containing symbolic variables into double array. Apply 'subs' function first to substitute values for variables.