File Exchange

image thumbnail

deseason

version 1.1.0.0 (2.28 KB) by Chad Greene
Remove the seasonal signal from a daily time series of data.

4 Downloads

Updated 31 Jan 2014

View License

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

Cite As

Chad Greene (2020). deseason (https://www.mathworks.com/matlabcentral/fileexchange/43222-deseason), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Gracy

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?

Updates

1.1.0.0

Changed behavior! Now restores DC offset.

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags