sin cos problem. How to solve it

why sind(45)=-0.707
it should be 0.707
and sind(18)=-0.9511
it should be 0.309
what's wrong with it

 採用された回答

Iain
Iain 2014 年 8 月 29 日

0 投票

Theres 2 things that could be wrong.
1. User error - You're actually putting in something like: (-90 + 18) and (-90 + 45), instead of 18 and 45. - This is what I expect
2. A bad prank - Someone has written a function called sind that doesn't do what you think it should, and you're actually using that function.

4 件のコメント

tabw
tabw 2014 年 8 月 29 日
編集済み: tabw 2014 年 8 月 29 日
I guess you are saying that it shifted 90 degree. But, I tried to compensate that by (90+45); still get the negative value.
2. I used the embedded function. I have read the mathwork site. It should be do what I think it should do.
Michael Haderlein
Michael Haderlein 2014 年 8 月 29 日
>> sind(45)
ans =
0.707106781186547
Here, it's doing what it's supposed to do. Please type in
type sind
and post the result here.
Iain
Iain 2014 年 8 月 29 日
If the result of:
which sind
says built-in, then you're using the built in version. If it says ....\sind.m, then the file can have been altered (which would be a bad prank)
tabw
tabw 2014 年 8 月 29 日
編集済み: tabw 2014 年 8 月 29 日
type sind
'sind' is a built-in function.
so strange..
After I restart matlab, It functions in a normal way. Thanks all of you

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

質問済み:

2014 年 8 月 29 日

編集済み:

2014 年 8 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by