how do you use sin in matlab?

45 ビュー (過去 30 日間)
Dwyane  Wade
Dwyane Wade 2011 年 8 月 14 日
like for example I will input sin 30
when I do this I get an error: ??? Undefined function or variable 'sin30'.
sin is a function right? I do not need to put a value for it but why do I still get this error.? help me guys please...

採用された回答

Yoav Livneh
Yoav Livneh 2011 年 8 月 14 日
Use sin(30).

その他の回答 (1 件)

Daniel Shub
Daniel Shub 2011 年 8 月 14 日
You need parentheses. For example:
sin(30)
Although you probably want
sin(30*pi/180)
since sin expects its argument to be in radians.
  1 件のコメント
John D'Errico
John D'Errico 2011 年 8 月 14 日
MATLAB has sind for those who insist on degrees.

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

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by