<p><em>Disclaimer: I've never used this toolbox and so cannot speak to the comparison of this toolbox with PyEphem.</em></p>

<p>There are some ephemeral and the like functions within Matlab, for example <a href="https://www.mathworks.com/help/aerotbx/ug/planetephemeris.html" rel="nofollow noreferrer">planetEphemeris</a>, <a href="https://www.mathworks.com/help/aerotbx/ug/earthnutation.html" rel="nofollow noreferrer">earthNutation</a>, or <a href="https://www.mathworks.com/help/aerotbx/ug/earthnutation.html" rel="nofollow noreferrer">moonLibration</a>.</p>

<p>Unfortunately these functions are only accessible within the <a href="https://www.mathworks.com/help/aerotbx/index.html" rel="nofollow noreferrer">Aerospace Toolbox</a> and do not come with a standard Matlab license. You'll need an entirely separate license for the Aerospace Toolbox to use these functions in your Matlab code.</p>

<p>If it is easy for you to obtain this license (be it from some university or organization), then by all means go for it. Otherwise, your best bet may be free packages like PyEphem.</p>

<p>I would also like to echo the <a href="https://astronomy.stackexchange.com/questions/19025/is-there-a-matlab-equivalent-of-pyephem#comment30692_19025">comment made by David</a> in that you should definitely learn Python. It is an amazingly simple, yet robust language that can do just about anything. And its free!</p>

<p>If you're really dead-set on using Matlab, but the PyEphem package is the only thing that does what you need, you can always consider porting between the two languages. Matlab has several tools and capabilities to interface with other languages. You can read more about using python packages natively in Matlab <a href="https://www.mathworks.com/help/matlab/getting-started_buik_wp-3.html" rel="nofollow noreferrer">right here</a>. I will say, this would probably be much harder than just going with Python outright though.</p>

CC BY-SA 3.0
2016-11-12T04:27:20.163Z
2016-11-12T04:27:20.163Z
2017-04-13T12:59:06.910Z
zephyr
<p>Many people on the Astronomy stack exchange use the <a href="http://rhodesmill.org/pyephem/index.html" rel="nofollow noreferrer">PyEphem</a>  package for the <a href="https://www.python.org/" rel="nofollow noreferrer">Python</a>  programmimg language to perform astronomical computations.  Are the underlying numerical routines (from <a href="http://www.clearskyinstitute.com/xephem/" rel="nofollow noreferrer">XEphem</a>) also available for <a href="https://www.mathworks.com/products/matlab/" rel="nofollow noreferrer">MATLAB</a>?</p>

CC BY-SA 3.0
2016-11-11T11:33:16.153Z
I am still undecided as to whether I should learn to use Python...
Christo
CC BY-SA 3.0
2016-11-11T17:16:36.940Z
Even if you do get an answer, learn Python.
David Hammen
<software>
Is there a MATLAB equivalent of PyEphem?
Christo
# Is there a MATLAB equivalent of PyEphem?

(Asked by: username_0 on 2016-11-11)

Many people on the Astronomy stack exchange use the [PyEphem](http://rhodesmill.org/pyephem/index.html) package for the [Python](https://www.python.org/) programmimg language to perform astronomical computations. Are the underlying numerical routines (from [XEphem](http://www.clearskyinstitute.com/xephem/)) also available for [MATLAB](https://www.mathworks.com/products/matlab/)?

**Tags:** software
> **Comments:**
> **username_0**: I am still undecided as to whether I should learn to use Python...  
> **username_1**: Even if you do get an answer, learn Python.  

---

## 1 answers

### Answer by username_2 on 2016-11-12. Score: 2

*Disclaimer: I've never used this toolbox and so cannot speak to the comparison of this toolbox with PyEphem.*

There are some ephemeral and the like functions within Matlab, for example [planetEphemeris](https://www.mathworks.com/help/aerotbx/ug/planetephemeris.html), [earthNutation](https://www.mathworks.com/help/aerotbx/ug/earthnutation.html), or [moonLibration](https://www.mathworks.com/help/aerotbx/ug/earthnutation.html).

Unfortunately these functions are only accessible within the [Aerospace Toolbox](https://www.mathworks.com/help/aerotbx/index.html) and do not come with a standard Matlab license. You'll need an entirely separate license for the Aerospace Toolbox to use these functions in your Matlab code.

If it is easy for you to obtain this license (be it from some university or organization), then by all means go for it. Otherwise, your best bet may be free packages like PyEphem.

I would also like to echo the [comment made by David](https://astronomy.stackexchange.com/questions/19025/is-there-a-matlab-equivalent-of-pyephem#comment30692_19025) in that you should definitely learn Python. It is an amazingly simple, yet robust language that can do just about anything. And its free!

If you're really dead-set on using Matlab, but the PyEphem package is the only thing that does what you need, you can always consider porting between the two languages. Matlab has several tools and capabilities to interface with other languages. You can read more about using python packages natively in Matlab [right here](https://www.mathworks.com/help/matlab/getting-started_buik_wp-3.html). I will say, this would probably be much harder than just going with Python outright though.


---

