Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.6K Views
|
4 Replies
|
1 Total Like
View groups...
Share
Share this post:

Smooth an arbitrary curve

Posted 3 years ago
POSTED BY: David Golber
4 Replies

Hi David!

You could also try Loess : `https://resources.wolframcloud.com/FunctionRepository/resources/Loess/ , read that post about SMOOTHING splines https://mathematica.stackexchange.com/questions/33206/implementation-of-smoothing-splines-function

Bernstein approximation is another possibility. It depends on your goal and hypotheses...

Regards,

Claude

POSTED BY: Claude Mante
Posted 3 years ago

Thanks ... I figured there was something like this. I'll see how it works with my stuff.

POSTED BY: David Golber
Posted 3 years ago

Hi David,

GaussianFilter is a standard smoothing method for data lists. Its the discrete version of smoothing a function with a moving average produced by the convolution of a piecewise continuous function with a Gaussian kernel ~ Exp[-x^2/sigma] of the normal distributiion.

Smoothing an Interpolation With a Gaussian Filter

This is a noisy data set from x|->(x/3)^2 Sin[2[Pi] x/22].

noisyf =  
  Array[({#, (#/3.0)^2 Sin[2 \[Pi] #/22] + 3.5 #  RandomReal[] } &), {56}, 0];

ListPlot[noisyf  ]

The data set is smoothed

 smoothf[s_]:= 
  smoothf[s] = 
(Transpose[  {#[[1]],  GaussianFilter[#[[2]], s] }] &)[Transpose[noisyf]];

Manipulate[
 Show[{ ListPlot[noisyf  , PlotStyle -> {Red, Opacity[0.5]},  Joined -> True], 
   ListPlot[smoothf[n], PlotStyle -> {Blue}, Joined -> True]}],
 {n,   Range[0, 7, 0.5]}]

Regards Roland

POSTED BY: Updating Name

Please provide your efforts in the form of the Wolfram Language code. This will make it easier for other members to help you. Check several methods available to include your code in the rules http://wolfr.am/READ-1ST

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard