From: Kirk Hammett on 8 Apr 2010 18:31 Hello - I have a seasonal time series that I want to convert to a stationary time series. I was curious if I could difference it at a specified lag using the diff() function in Matlab (or any other function). diff(ts,12) would difference it 12 times! Definitely do not want that. Is there some way I can tell it to basically X_{t} - X_{t-12}? If not I'll write my own function but this seems really basic so I think Matlab should be able to do this. Thank you for your time.
From: Jan Simon on 8 Apr 2010 19:00 Dear Kirk! > Hello - I have a seasonal time series that I want to convert to a stationary time series. I was curious if I could difference it at a specified lag using the diff() function in Matlab (or any other function). diff(ts,12) would difference it 12 times! Definitely do not want that. Is there some way I can tell it to basically X_{t} - X_{t-12}? x = rand(1, 100); d = x(1:100 - 12 + 1) - x(12:100) Jan
From: Kirk Hammett on 8 Apr 2010 19:33 "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hpln67$k73$1(a)fred.mathworks.com>... > Dear Kirk! > > > Hello - I have a seasonal time series that I want to convert to a stationary time series. I was curious if I could difference it at a specified lag using the diff() function in Matlab (or any other function). diff(ts,12) would difference it 12 times! Definitely do not want that. Is there some way I can tell it to basically X_{t} - X_{t-12}? > > x = rand(1, 100); > d = x(1:100 - 12 + 1) - x(12:100) > > Jan Thanks! I have to get used to the Matlab way of doing things!
|
Pages: 1 Prev: Registering CT images Next: save all variables in function scope to main workspace |