https://au.mathworks.com/help/aerotbx/ug/matlabshared.satellitescenario.eclipse.eclipseintervals.html
eclipseIntervals - Calculate intervals of solar occultation - MATLAB
This MATLAB function returns a table, interval_table, of solar occultation intervals.
calculateintervalssolaroccultationmatlab