0

my code is:

function F=root4d(x)

W1 = 0.928*(6-0.928)/tan(x(3))*20;
W2 = (6-0.928)*((6-0.928)/(tan(x(3))))/2*20;
F(1)= x(4)*cos(10*pi/180)+x(1)*cos(x(3))-x(2)*sin(x(3));
F(2)= x(4)*sin(10*pi/180)+x(1)*sin(x(3))+x(2)*cos(x(3))-10*(6-0.928)/tan(x(3))-W1-W2;
F(3)= x(1)-x(2)*tan(20*pi/180)-10*(6-0.928)/sin(x(3));
F(4)= diff(x(4),x(3));

and also:

fun = @root4d;
x0 =[0,0,0,0];
x=fsolve(fun,x0)

but it doesn't work. I get:

Error in solver (line 3)
x=fsolve(fun,x0)

Caused by:
    Failure in initial objective function evaluation. FSOLVE cannot continue.

What can I do to solve my system of nonlinear equations?

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120

0 Answers0