Re: Plot - LinearFilter/List Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg64510] Re: [mg64486] Plot - LinearFilter/List Problem
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 20 Feb 2006 06:29:48 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
You called LinearFilter before you loaded the add-on package that defines it. Needs["Statistics`DataSmoothing`"]; data=Sort[Table[10*Random[],{9}]]; dd=FoldList[Plus,0,data]; nn=LinearFilter[dd, {1/2,1/2}]; n=Length[nn] 9 ListPlot[nn,PlotJoined->True]; r=Range[n]; ListPlot[nn,PlotJoined->True, Frame->True,Axes->False, PlotRange->{First[dd]-2,Last[dd]+2}, Epilog->{AbsolutePointSize[4], Blue,Point/@Thread[{r,Most[dd]}], Green,Point/@Thread[{r,nn}], Red,Point/@Thread[{r,Rest[dd]}]}, ImageSize->432]; Bob Hanlon > > From: "Lea Rebanks" <lrebanks at netvigator.com> To: mathgroup at smc.vnet.net > Subject: [mg64510] [mg64486] Plot - LinearFilter/List Problem > > 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... > > > >