how do you use sin in matlab?

28 Ansichten (letzte 30 Tage)
Dwyane  Wade
Dwyane Wade am 14 Aug. 2011
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...

Akzeptierte Antwort

Yoav Livneh
Yoav Livneh am 14 Aug. 2011
Use sin(30).

Weitere Antworten (1)

Daniel Shub
Daniel Shub am 14 Aug. 2011
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 Kommentar
John D'Errico
John D'Errico am 14 Aug. 2011
MATLAB has sind for those who insist on degrees.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by