how to solve this equation
3 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to solve this equation:
c=(sind(d)*sind(L)*cosd(b)) - (sind(d)*cosd(L)*sind(b))+(cosd(d)*cosd(L)*cosd(b)*cosd(h))+(cosd(d)*sind(L)*sind(b)*cosd(h))==0
solve for h, L=b=28.6
but I'm getting error:
??? Error using ==> cosd at 16
Argument should be real.
I'm using MATLAB 2010a
0 件のコメント
回答 (2 件)
Romil Shah
2015 年 6 月 28 日
編集済み: Walter Roberson
2015 年 6 月 28 日
%Using any value gives a proper answer...please try again
L=28.6;
b=28.6;
d=28.6;
h=28.6
c=(sind(d)*sind(L)*cosd(b)) - (sind(d)*cosd(L)*sind(b))+(cosd(d)*cosd(L)*cosd(b)*cosd(h))+(cosd(d)*sind(L)*sind(b)*cosd(h));
c =
0.7709
Walter Roberson
2015 年 6 月 28 日
In order for that to have happened, your "d" would have had to have been a complex number. For example if you had used
d = i;
then the problem could have occurred, as "i" is the imaginary unit, sqrt(-1). So is "j".
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!