Excuse me, but what's the timeaverage function in the code? Because I don't have this function in MATLAB, the code doesn't work properly