Re: Multiple application of LinearFilter
- To: mathgroup at smc.vnet.net
- Subject: [mg64844] Re: Multiple application of LinearFilter
- From: bghiggins at ucdavis.edu
- Date: Sun, 5 Mar 2006 03:19:06 -0500 (EST)
- References: <dubjps$h0t$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Lea, Use NestList or Nest as shown below: <<Statistics`DataSmoothing` data1 = {7.,4.,5.,3.,8.,5.,2.,3.,6.,8.}; This function displays the data after each pass through the filter, up to n passes: myFilter[n_Integer]:=NestList[LinearFilter[#,{1/2,1/2}]&,data1,n] myFilter[4] This function displays the data after n passes through the filter: myFilter2[n_Integer]:=Nest[LinearFilter[#,{1/2,1/2}]&,data1,n] myFilter2[4] Hope this helps, Cheers, Brian