MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot - LinearFilter/List Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64524] Re: Plot - LinearFilter/List Problem
  • From: dh <dh at metrohm.ch>
  • Date: Mon, 20 Feb 2006 06:30:04 -0500 (EST)
  • References: <dt9i2r$gfl$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Lea,
A linear filter of length n "eats" n points producing 1 filtered point. 
If you calculate the convolution you therefore loose n-1 points or 
(n-1)/2 at both ends. For calculations it is more convenient of the 
number of points stays constant. Therefore, different tricks are used to 
enforce this:
1) you can duplicate end points,
2) you can wrap around your data so that after the last data point there 
comes the first one,
3) you may extrapolate data to the left and right
4) you may add data points of your own choosing
e.t.c

Daniel

Lea Rebanks wrote:
> Hi All,
>  
> Given the following
>  
> data={1,2,3,4,5,6,7,8,9};
>  
>  dd=FoldList[Plus,0,data];
>  
>  Length[data]
>  9
>  
>  Length[dd]
>  10
>  
>  nn=Linear Filter[dd,{1/2,1/2}]
>  
>  Length[nn]???? Thought it would be = 10 = dd ????
>  2
>  ListPlot[dd,PlotJoined->True];
> 
>  ListPlot[nn,PlotJoined->True];  ?????
>  
>  
> I am trying to plot the list "nn" (the LinearFilter[results]) in this
> simple.
>  
> Many thanks for your attention & help.
>  
> Lea Rebanks...
>  
> 
> 


  • Prev by Date: Re: Re: Not Using a Text Editor Interface for Mathematica
  • Next by Date: Re: Greek-Letter Bug? Replacing Print
  • Previous by thread: Plot - LinearFilter/List Problem
  • Next by thread: Re: Plot - LinearFilter/List Problem