フィルターのクリア

how can i solve for an angle if it is associated in the equation with cos and sin.

1 回表示 (過去 30 日間)
Kush Kumar Nepal
Kush Kumar Nepal 2017 年 4 月 18 日
回答済み: Sonam Gupta 2017 年 4 月 21 日
syms D
w=1.65;
d=0.1;
B=20*pi/180;
I=-25*pi/180;
a=B+I;
e=14*pi/180;
c=sqrt((w/d-sin(B))^2-cos(B-D)-cos(a)^2);
solve(' -sin(a)-sin(B-D)+w/d-c',D)
In the above equation, D is unknown, I need to find out the value for D.
as I have tried as the code mentioned. but it gives me an error. can anyone please help me to fix this problem, as I am new to the software. thanks in advance.
  2 件のコメント
GEEVARGHESE TITUS
GEEVARGHESE TITUS 2017 年 4 月 18 日
c is also unknown.. can you show the code you have written
Kush Kumar Nepal
Kush Kumar Nepal 2017 年 4 月 18 日
編集済み: Kush Kumar Nepal 2017 年 4 月 18 日
@GEEVARGHESE TITUS
sin (B + Di) + sin(B - Do) = w/d - sqrt((w/d-2sinB)^2-cos(B-Do)-cos(B+Di)^2)
This is the equation I am trying to solve, where the values are given for w,d,Di,B except Do. Do is to find out.
function y = kush
syms D
w=1.65;
d=0.1;
B=20*3.1416/180;
I=-25*3.1416/180;
a=B+I;
e=14*pi/180;
c=sqrt((w/d-sin(B))^2-cos(B-D)-cos(a)^2);
y= -sin(a)-sin(B-D)+w/d-c;
end
can you please suggests me how can I solve this. Thank you

サインインしてコメントする。

回答 (1 件)

Sonam Gupta
Sonam Gupta 2017 年 4 月 21 日
You can refer to the documentation of 'solve' here:
You can change your code as below:
syms D
w=1.65;
d=0.1;
B=20*3.1416/180;
I=-25*3.1416/180;
a=B+I;
e=14*pi/180;
c=sqrt((w/d-sin(B))^2-cos(B-D)-cos(a)^2);
solve(sin(B - D)+sqrt((w/d-2*sin(B))^2-cos(B-D)-cos(B+I)^2) == w/d - sin(B + I) , D)
If you want answer to be in numeric values, you can use 'fsolve'. See the link below for the same:
Hope this helps!

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by