View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
deseason

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 2.28 KB File ID: #43222 Version: 1.1
image thumbnail

deseason

by

Chad Greene (view profile)

 

26 Aug 2013 (Updated )

Remove the seasonal signal from a daily time series of data.

| Watch this File

File Information
Description

Remove the daily mean value from a multi-year time series. The time series t and y must be vectors of equal length and t must be daily values in datenum format.

y_deseasoned = deseason(t,y); returns the deseasoned y signal.

[y_ds,y_s] = deseason(t,y); returns the deseasoned y signal and the extracted seasonal signal such that y = y_s + y_ds.

[y_ds,y_s,annualsig] = deseason(t,y); also returns a vector of length 366 containing the annual signal where the index of annualsig corresponds to the day of the year.

This function requires Anthony Kendall's date2doy function available on the Mathworks FEX site: http://www.mathworks.com/matlabcentral/fileexchange/18316

Acknowledgements

Date To Decimal Day Of Year, Get Climate Teleconnection Indices, and Get Land Surface Temperatures inspired this file.

This file inspired Downsample Ts.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Other requirements Requires date2doy FEX submission 18316.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
07 Sep 2016 Gracy

Gracy (view profile)

Thank you for submission. As you have written that X and Y should have same length . My data has few data gaps as well ...even monthly data has also gaps. So how can I detrend my series for seasonal component?

Comment only
Updates
31 Jan 2014 1.1

Changed behavior! Now restores DC offset.

Contact us