this is my code i am unable to substitue x1,x2,x3,x4 values in the matrix.Please help in solve this.
syms x1 x2 x3 x4g1=cos(x1)+cos(x2)+cos(x3)+cos(x4)-0.9424;g2=cos(5*x1)+cos(5*x2)+cos(5*x3)+cos(5*x4);g3=cos(7*x1)+cos(7*x2)+cos(7*x3)+cos(7*x4);g4=cos(11*x1)+cos(11*x2)+cos(11*x3)+cos(11*x4);g=[g1;g2;g3;g4];x=[x1;x2;x3;x4];j=jacobian(g,x)j_inv=inv(j)p=j_inv*-gx1=input('enter initial values of x1')x2=input('enter initial values of x2')x3=input('enter initial values of x3')x4=input('enter initial values of x4')disp(x)disp(p)subs(p)
Best Answer