Path: news.mathworks.com!not-for-mail
From: "Anna Chen" <icedredtea@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: applying functions to grouped data
Date: Thu, 5 Nov 2009 17:51:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <hcv3a6$ja$1@fred.mathworks.com>
References: <hcsqn1$ju4$1@fred.mathworks.com> <hct2gg$mm8$1@fred.mathworks.com> <hctf96$l7g$1@fred.mathworks.com> <hcthti$43u$1@fred.mathworks.com>
Reply-To: "Anna Chen" <icedredtea@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257443462 618 172.30.248.37 (5 Nov 2009 17:51:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Nov 2009 17:51:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1455324
Xref: news.mathworks.com comp.soft-sys.matlab:582813


hello,
i changed my data to separate the dates.  could you give me some tips on how to create a moving average filter?  i think it would be very useful for a variety of things in the future.
thanks!


"ade77 " <ade100a@gmail.com> wrote in message <hcthti$43u$1@fred.mathworks.com>...
> 
> > thanks for your response!  actually, i'm having a problem even getting the dates in correctly to matlab.  i'm importing a large file that has dates in the first column, and matlab will always separate it from the rest of the columns.  how would i reincorporate this first column and apply the moving average filter?  also, what if i wanted to apply some other moving function, other than averages?
> > 
> > thanks so much!
> 
> First save your orignal file before manipulating it. then create another copy.
> 
> Is your file an excel file? One easy way is to create ( in excel) three additional columns for year, month and day. I am not sure how good your excel is. 
> 
> The problem with excel is that when the date is in 'date format' in excel, MATLAB has problem recognizing that format.
> 
> So once you import it into MATLAB, let me know. Actually, the actual code of your moving average is very easy to write.
> 
> If you do not know how to create those columns in excel , let me know and I will give you the steps. Like new_col 1= YEAR(A1), new_col2 = MONTH(A1) etc