[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: vectorized moving average?
From: |
Tim Rueth |
Subject: |
RE: vectorized moving average? |
Date: |
Fri, 7 May 2010 12:33:47 -0700 |
I looked at both conv() and filter(), but can't figure out how to do a
moving average with them. Perhaps I'm not understanding the functions of
the input vars correctly.
Let's say I have an array, a = rand(1,100). Can you tell me how I'd use
conv() and filter() to take, say the 10-day moving average of it, with a
weighting of 0.5?
Thanks!
> -----Original Message-----
> From: Andy Buckle [mailto:address@hidden
> Sent: Thursday, May 06, 2010 12:06 AM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: vectorized moving average?
>
> conv is also an m file, but it only has a few ifs in. then it
> calls filter to get the job done. which is an oct file.
>
> Andy
>
> On Thu, May 6, 2010 at 6:28 AM, Tim Rueth <address@hidden> wrote:
> > Does anyone know how to take an n-day weighted moving average of a
> > vector without using a for-loop? I looked at the M code
> for movavg()
> > and it uses a for-loop, so I'm guessing there probably isn't a way,
> > but I thought I'd check. Thanks.
> >
> > --Tim
> > _______________________________________________
> > Help-octave mailing list
> > address@hidden
> > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> >
> >
>
>
>
> --
> /* andy buckle */
>
- vectorized moving average?, Tim Rueth, 2010/05/06
- Re: vectorized moving average?, Andy Buckle, 2010/05/06
- RE: vectorized moving average?,
Tim Rueth <=
- Re: vectorized moving average?, James Sherman Jr., 2010/05/07
- RE: vectorized moving average?, Tim Rueth, 2010/05/11
- Re: vectorized moving average?, James Sherman Jr., 2010/05/11
- RE: vectorized moving average?, Tim Rueth, 2010/05/11
- Re: vectorized moving average?, James Sherman Jr., 2010/05/11
- RE: vectorized moving average?, Tim Rueth, 2010/05/12
- Re: vectorized moving average?, Francesco Potortì, 2010/05/13
- Re: vectorized moving average?, James Sherman Jr., 2010/05/13
- RE: vectorized moving average?, Tim Rueth, 2010/05/13
- Re: vectorized moving average?, James Sherman Jr., 2010/05/14