Re: Moving average / smoothing data
- To: mathgroup at smc.vnet.net
- Subject: [mg64078] Re: [mg64063] Moving average / smoothing data
- From: Pratik Desai <pdesai1 at umbc.edu>
- Date: Tue, 31 Jan 2006 01:14:28 -0500 (EST)
- References: <200601300410.XAA29456@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Lea Rebanks wrote:
>Hi All,
>
>Given the following function & subsequent plot.
>
>tt={1.5*Sin[x]+0.5*Sin[20*x],1.5*Sin[x]};
>pp=Plot[Evaluate[tt],{x,0,20}];
>
>
>I am trying to get the best smoothing / moving average function closest
>to the underlying 1.5*sin[x]
>
>Has anyone got any suggestions? Please show coding in reply so I can
>plot & see result.
>
>I have similar noise on exponential data, so hopefully
>the moving average you recommend will work on that too.
>
>Many thanks for your attention.
>
>Lea Rebanks...
>
>PS I am using version 5.1
>
>
>
>
Hi Lea,
I am not quite sure what you want to do here, if you want to find the
interpolating function for 1.5*Sin[x] why not just do this
tf=1.5*Sin[x]
Interpolation[Table[{x,tf},{x,0,20,0.1}]]
ListPlot[Table[Interpolation[Table[{x,tf},{x,0,20,0.1}]][x],{x,0,20,0.1}],PlotJoined->True]
I think if you want to add the other term of period 20 you can fit that as well.
Do you want to filter out the noise?
Hope this helps
- References:
- Moving average / smoothing data
- From: "Lea Rebanks" <lrebanks@netvigator.com>
- Moving average / smoothing data