Mar-23-2019, 07:25 AM
This detailed screenshot http://imgbox.com/qFBxoHWd shows how I've solved, in the old past, the system by means of a MatLab function (fsolve), and I'ld like to know if a similar (short) way exists in Python.
Algorithms are listed below:
May I have some drifts to reach the goal? Thanks in advance
Edit. For short way I mean the use of an intrinsic function to avoid the classical procedure via an iterative method and related jacobian matrix.
Algorithms are listed below:
Output:% ------ system of 3 non linear equations ----------
%
function y=f(x)
y=zeros(3,1);
rad = pi/180;
l1 = 150.210355; s1 = -38.913290; d1 = -11.185833;
l2 = 180.308440; s2 = -14.878290; d2 = 14.545555;
l3 = 223.495977; s3 = 20.492543; d3 = -8.679444;
%---------------------------------------------------
l1 = l1 * rad; s1 = s1 * rad; t1 = tan(d1 * rad);
l2 = l2 * rad; s2 = s2 * rad; t2 = tan(d2 * rad);
l3 = l3 * rad; s3 = s3 * rad; t3 = tan(d3 * rad);
% --------------------------------------------------
y(1)= sin(x(1)+s1)-tan(x(3)+l1)*(cos(x(1)+s1)* sin(x(2))- t1* cos(x(2)));
y(2)= sin(x(1)+s2)-tan(x(3)+l2)*(cos(x(1)+s2)* sin(x(2))- t2* cos(x(2)));
y(3)= sin(x(1)+s3)-tan(x(3)+l3)*(cos(x(1)+s3)* sin(x(2))- t3* cos(x(2)));
endfunction
rad = pi/180;
[x,fval,info]=fsolve(@f,[10*rad;50*rad;0*rad]) % #3 starting values in radians
la= x(1)/rad
fi= x(2)/rad
eps= x(3)/rad
% ---------------- OUTPUT ---------------------
x =
2.6180e-001
6.4577e-001
5.6800e-008
fval =
1.0311e-008
4.9066e-008
5.0822e-008
May I have some drifts to reach the goal? Thanks in advance
Edit. For short way I mean the use of an intrinsic function to avoid the classical procedure via an iterative method and related jacobian matrix.