I have these a nonlinear system of equations:
phi and psi are constants and will be taken as input from the user.
I tried using fsolve but i got the message:
"No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
value of the function tolerance."
When I try to solve using vpasolve i get the message:
"Error using mupadengine/feval_internal
More equations than variables is only supported for polynomial systems."
And when i try to use "solve" , then i get the message:
"Warning: Unable to find explicit solution" and empty sym.
Can you help me to solve this? this is the code i have when i tried fsolve
phi = input('Enter phi value: ');psi = input('Enter psi value: ');f = @(y) [(-1/2)*(cos(y(2))*cos(y(3))+sin(y(1))/psi);(phi*sin(y(1)))-(1/2)*cos(y(2))*sin(y(3)); phi*(cos(y(1)))+(1/2)*sin(y(2))*cos(y(3))];fsolve(f, [1 2 3])
And the code i tried using vpa solve:
phi = input('Enter phi value: ');psi = input('Enter psi value: ');syms x z theta eqn1 = -(1/2)*(cos(x)*cos(z)+sin(theta)/psi) == 0;Stheta = solve(eqn1,theta)eqns = [phi*sin(Stheta)-(1/2)*cos(x)*sin(z) == 0, phi*cos(Stheta) + (1/2)*sin(x)*cos(z) == 0];[tout,S] = vpasolve(eqns,[x z])
Best Answer