[Scilab-users] Wrong number of arguments? exclusive)

Rafael Guerra jrafaelbguerra at hotmail.com
Wed Apr 6 13:06:21 CEST 2016


For sake of accuracy in detriment of bandwidth: setting equal weights in
Bartlett3p should produce a 3-point moving average (mean) filter, not a median
filter
 
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup
Sent: Tuesday, April 05, 2016 7:25 PM
To: users at lists.scilab.org
Subject: Re: [Scilab-users] Wrong number of arguments? exclusive)
 
Hi Buk

>your 3 point median filter (perhaps extending it to 5 or 7) and Claus'
Barlett3p() 

Well, if the median filter doesn't solve the problem ... then for sure the
Bartlett window will also not solve the problem - it was meant to be the least
intrusive (most true to the original data) smoothing you could possibly do.

I had major success with a Bartlett window, where I had a frequency response,
did an inverse-discrete Fourier Transform (IDFT) ... and I used only 128 points
(to reduce calculation time) so that time response had some zig-zag patterns -
the Barlett window made a fantastic smooth result. Each smoothing window has its
strengths and weaknesses.

You can convert the code for Barlett3p to a Median3p, simply by replacing the
weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333 0.334 0.333 ...

Someone suggested to compare the raw data with the smoothed data - and determine
persistent issues. Maybe delete the tricky data that doesn't ensure convex space
... I think that's your best option because the remaining data is true to your
original data. If deleting a data point is of concern - the alternative is to
replace the bad data point with a data point interpolated between the
surrounding data.

/Claus


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160406/4e13da79/attachment.htm>


More information about the users mailing list