Hi all,
I would like to use the results of an expression performed in a Table, Do loop, or other loop operations, for further calculations, but I do not know how to.
I want to find the theta angles for different ThetaP angles using the FindRoot function:
`Lp = 180;
L1 = 150;
L2 = 420;
L3 = 460;
[Theta]1 = 30 [Degree] ;
Table[res1 =
FindRoot[{450 ==
Lp Cos[[Theta]p] + L1 Cos[[Theta]1] + L2 Cos[[Theta]2] +
L3 Cos[[Theta]3],
530 == Lp Sin[[Theta]p] + L1 Sin[[Theta]1] +
L2 Sin[[Theta]2] + L3 Sin[[Theta]3]}, {{[Theta]2,
90 [Degree]}, {[Theta]3, 10 [Degree]}}], {[Theta]p , 180,
185}]`
This Table gives me results of Theta2 and Theta3 for certain interval of ThetaP. Now I would like to perform multiple operations for each of the combinations of Theta2 and Theta3. E.g. those calulations:
{xp, yp} = { Lp Cos[\[Theta]p], Lp Sin[\[Theta]p]} ; {x1, y1} = {xp + L1 Cos[\[Theta]1], yp + L1 Sin[\[Theta]1]} ; {x2, y2} = {x1 + L2 Cos[\[Theta]2], y1 + L2 Sin[\[Theta]2]}; {x3, y3} = {x2 + L3 Cos[\[Theta]3], y2 + L3 Sin[\[Theta]3]} ;
Can I execute those calculations inside the Table function, or is there a way how to refer to those results later?
Another question:
In this example I have fixed the value of Theta1, so the system of nonlinear equations is solvable. But in the future I would like also Theta1 to be free. This way I will have 3 unknowns and 2 equations. Any suggestions will be appreciated.
Regards,
Jurij