gpt4 book ai didi

数学 8 : Convert from cartesian to spherical coordinates

转载 作者:行者123 更新时间:2023-12-01 13:35:59 25 4
gpt4 key购买 nike

我刚开始使用 Mathematica 时遇到了一个问题。我想更优雅地解决。我有 {x,y,z} 形式的测量数据,想将这些数据转换为特殊坐标。我知道如何使用简单的功能来做到这一点。但是代码变得丑陋。我想要这样的东西:

v={x,y,z}
TranformSpherical[v]

我查看了文档,只找到了版本 9 的内容,我使用的是版本 8,但在我尝试时它不起作用。此外,我还没有在其他任何地方找到明确的解决方案。希望这里有人知道解决问题的简单方法。

最佳答案

等式是 given on Wikipedia并且是简单的功能评估。是什么阻止您简单地计算它们,它是如何变得丑陋的?

enter image description here

enter image description here

enter image description here

确保在 Mathematica 中使用 ArcTan[x, y],它计算四象限反正切。有关详细信息,请参阅 article about atan2 .

关于数学 8 : Convert from cartesian to spherical coordinates,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15213818/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com