在 Mathematica 8 中将度数设置为默认值
是否可以将三角函数设置为使用度数而不是弧度?
Is it possible to set the trigonometric functions to use degrees instead of radians?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
是否可以将三角函数设置为使用度数而不是弧度?
Is it possible to set the trigonometric functions to use degrees instead of radians?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
简短回答
不,这是不可能的。我建议定义替代函数,并使用这些函数:
sinDeg[d_] := Sin[d Degree]
。或者直接使用Degree
:Sin[30 Degree]
。 (也可以尝试输入ESC deg ESC
。)更长的答案
您可以
取消保护
函数,并使用Gayley-Villegas 技巧,但这很可能会破坏 Mathematica 中的一些功能,因为我预计它会在内部使用这些函数。由于这是一件令人讨厌的事情,所以我不会提供代码示例,而是让您根据上面的链接来弄清楚。 :-)
Short answer
No, this is not possible. I'd suggest to define alternative functions, and work with those:
sinDeg[d_] := Sin[d Degree]
. Or just useDegree
explicitly:Sin[30 Degree]
. (Try also enteringESC deg ESC
.)Longer answer
You can
Unprotect
the functions, and re-define them using the Gayley-Villegas trick, but this is very likely to break several things in Mathematica, as I expect it is using these functions internally.Since this is such a nasty thing to do, I'm not going to give a code example, instead I'll leave it to you to figure out based on my link above. :-)
我认为输出是基于输入的。例如,
Cos[60 Degree]
将以度为单位输出。I think the output is based on the input. So for example
Cos[60 Degree]
will output in degrees.