Re: Plot - LinearFilter/List Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg64511] Re: [mg64486] Plot - LinearFilter/List Problem
- From: "Lea Rebanks" <lrebanks at netvigator.com>
- Date: Mon, 20 Feb 2006 06:29:49 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Many thanks for your help, Bob. I can't believe I missed that ... really grateful. Best Regards - Lea Rebanks... -----Original Message----- From: Bob Hanlon [mailto:hanlonr at cox.net] To: mathgroup at smc.vnet.net Subject: [mg64511] Re: [mg64486] Plot - LinearFilter/List Problem 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: [mg64511] [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... > > > >