Toolbox and Add-on path not found in path

23 views (last 30 days)
Using MATLAB 2017b.
I was trying to use this function to determine the position and velocity of planets:
[position,velocity]=planetEphemeris(juliandate(2018,1,1),'Earth','Moon')
and I've already installed the aerospace toolbox, it's located in the Mac applications directory with the aeroDataPackage. (PS. all my MATLAB written scripts directory is located in a specified MATLAB folder in the Documents directory).
When I ran my script using that function, I got this error. I don't understand why since I got it downloaded and is found in the directory. Please help and explain?
Error using planetEphemeris (line 160)
Ephemeris data is not available on the MATLAB path. You might need to download
it using the aeroDataPackage function.
Error in Runs (line 140)
[position,velocity]=planetEphemeris(juliandate(2018,1,1),'Earth','Moon')

Accepted Answer

Sergio Tamayo
Sergio Tamayo on 23 Jan 2018
If you downloaded the support package, it should be available. You can try to regenerate the path by running:
rehash toolboxcache
If you are still seeing the same error, check that you downloaded the support package by running:
which -all ephConstants.mat
If no file is returned, it means that the support package was not properly installed and you may need to re-install. You can do so by running aeroDataPackage again.
  1 Comment
Danielle
Danielle on 23 Oct 2025 at 19:09
I am having the same issue. I have the aero toolbox and have downloaded the ephemeris data. When I run the command 'aeroDataPackage', the Add-On explorer window pops up, and the Ephemeris Data for Aerospace Toolbox has the green "installed" icon on it. I have tried uninstalling and re-installing twice now. After re-install, during the same matlab session, the function planetEphemeris runs fine. But when I close and re-open Matlab, I get the same error: "Ephemeris data is not available on the MATLAB path. You might need to download it using the aeroDataPackage function."
I have tried searching for the ephem .mat file everywhere and cannot seem to locate it. So I do not know if this is a path issue or if the ephemeris files are just not saved after closing the Matlab session (after installing the add on).
I've tried your two commands. And after running :
>> which -all ephConstants.mat
'ephConstants.mat' not found.
Please help.

Sign in to comment.

More Answers (1)

Jan
Jan on 23 Jan 2018
Edited: Jan on 23 Jan 2018
If planetEphemeris is an M-file, you can examine the line around line 160 to find out, where this function looks for the file, which is called "Ephemeris data" in the error message. Does the needed file exist anywhere else? Did you follow the instruction from the message already:
You might need to download it using the aeroDataPackage function.
? You write "I got it downloaded", but it is not clear, if this means the required file or the toolbox.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!