I wrote a following program, but it is giving some errors?
clear allsyms xh=4;gma=18.4;ka1=0.2;kp1=8.76ka2=0.2;kp2=8.76;sindel=0.437;cosdel=0.9;pa1=ka1*gma*(h*x(1)+0.5*x(1)^2);pp1=kp1*gma*0.5*x(1)^2;pa2=ka2*gma*(x(1)*x(2)+0.5*x(2)^2);pp2=kp2*(x(2)*(h+x(1))+0.5*x(2)^2);za1=(0.5*h*x(1)^2+(x(1)^3)/6)/(h*x(1)+0.5*x(1)^2);zp2=(0.5*(h+x(1))*x(2)^2+((x(2)^3)/3))/((h+x(1))*x(2)+0.5*x(2)^2);za2=(0.5*x(1)*x(2)^2+((x(2)^3)/3))+(x(1)*x(2)+0.5*x(2)^2);e1=pp1*sindel-pa1*sindel-pp2*sindel-pa2*sindel;e2=pp1*cosdel+pa2*cosdel-pa1*cosdel-pp2*cosdel-x(3);e3=pp1*cosdel*(x(1)/3)+pp2*cosdel*zp2-pa1*cosdel*za1-pa2*cosdel*za2-x(3)*(x(1)+(h/3));g=[e1; e2; e3];J=jacobian([e1, e2, e3], [x(1), x(2), x(3)])
Best Answer