From: Mark Karani on
"Bryan Smith" <wbsmith(takethisout)@its.(andthistoo)caltech.edu> wrote in message <eee40b2.-1(a)webx.raydaftYaTP>...
> Hi,
>
> In looking through the help, I have found that the results of using
> 'smooth' will differ from the results of using 'filter' to compute an
> adjacent average of a vector. The help then refers me to the
> "Difference Equations and Filtering" section for more on this issue,
> but I find nothing relevant in that section of the help.
>
> Anyway, my question is this: When I use 'filter' to get the adjacent
> average of my signal, why are the peaks of the resulting signal
> right-shifted compared both to the unfiltered data as well as the
> result of the adjacent averaging using 'smooth'? In other words, the
> resulting signal when I use smooth generates peaks in the same
> x-location as the raw data. I am finding this to be true in general
> when I use filter, and I am hoping someone can help me figure out
> this difference. I looked at the code for smooth, and I am not able
> to find where it might be making the difference.
>
> In case someone asks, "So why not just use smooth?" the answer is
> that I would prefer to design a better low-pass filter for my data,
> but when I do so, I get shifts in the x-positions of the peaks. I am
> sure this is something I just do not understand about filtering (I am
> very new to this stuff), so hopefully someone can help. Thanks in
> advance!
>
> Bryan
 | 
Pages: 1
Prev: regexprep tokens
Next: PLOT file.m in GUI