Moving average

>> num_samples4window = 20;
>> tma = movingaverage( t, num_samples4window )

The filtered timetrend is saved in the variable "tma"

To view the results, run the following commands:

>> figure('Name','Before/after smoothing')
>> plot(t,'b')
>> hold on
>> plot(tma,'r')
>> legend {'Original' 'Smoothed'}