MATLAB: Unable to use Aerospace Blockset function eci2ecef

Aerospace Blockseteci2ecef

Hi, I need to a function to transform acceleration data from ECI to ECEF frame and I found this function on Aerospace Blockset which does exactly what I need (https://www.mathworks.com/help/aeroblks/eci2ecef.html). However, I was unable to use it within a normal matlab script. I tried one of the example codes from the help center:
r_eci = [-2981784 5207055 3161595];
utc = [2019 1 4 12 0 0];
mjd = mjuliandate(utc);
pm = polarMotion(mjd, 'action', 'none')*180/pi;
r_ecef = eci2ecef(utc, r_eci, 'pm', pm)
And I got the following error:
Unrecognized function or variable 'eci2ecef'.
Is it possible to use this function outiside of Simulink in a normal script? Does anyone knows a good replacement for this function?
Thanks

Best Answer

Hi Eduardo,
The "eci2ecef" is part of the set of function in CubeSats hence the function requires the 'Aerospace Blockset CubeSat Simulation Library' Add-on support package. You could download this from the Add-ons manager.
Hope it helps!