Cosine of an angle

4 ビュー (過去 30 日間)
Muerus Rodrigues
Muerus Rodrigues 2021 年 4 月 29 日
回答済み: Matt J 2021 年 4 月 29 日
Hello, We know Cosine (x) = Cosine(-x). I have a set of three equations and three unknowns involving finding l2, m2 and d2. I am only able to get the positive angle as the result (1.5708). How do we obtain negative angle i.e (-1.5708) as a result. Thank you
E4 = (Sk(1)+(r)*cos(l2)*sin(m2))== Sk(1)-unit_vi(1)*d2;
E5 = (Sk(2)+(r)*sin(l2)*sin(m2))== Sk(2)-unit_vi(2)*d2;
E6 = ((Sk(3)-L)+(r)*cos(m2))== Sk(3)-L;
result2 = solve(E4,E5,E6);
disp(double(result2.l2))
disp(double(result2.m2))
disp(double(result2.d2))
Output:
0
1.5708
3
Currently, I am doing - double(result.m2) to substitute in another equation.

回答 (2 件)

Star Strider
Star Strider 2021 年 4 月 29 日
Experiment with vpasolve, and specifically Specify Ranges of Solutions .

Matt J
Matt J 2021 年 4 月 29 日
As far as I can see, only by changing the equations:
E4 = (Sk(1)-(r)*cos(l2)*sin(m2))== Sk(1)-unit_vi(1)*d2;
E5 = (Sk(2)-(r)*sin(l2)*sin(m2))== Sk(2)-unit_vi(2)*d2;
E6 = ((Sk(3)-L)+(r)*cos(m2))== Sk(3)-L;

カテゴリ

Help Center および File ExchangeSwitches and Breakers についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by